I wrote a high-quality landscape zooming shader:
To my implementation:
there is yet a filter that transports Landscape-Pixel information to Blue-buffer of Surface32. I do also have a Shader that filters a special color but i do not know where the TexID of each landscape material is stored.
just import this diff with
I hereby license the following file(s) under the CC-by license
To my implementation:
there is yet a filter that transports Landscape-Pixel information to Blue-buffer of Surface32. I do also have a Shader that filters a special color but i do not know where the TexID of each landscape material is stored.
just import this diff with
hg import file.diff
and recompile the code.I hereby license the following file(s) under the CC-by license
Attachment: shaderpatch.diff (23k)
![CIMG0049.JPG (741k)](https://attach.openclonk.org/8/1808/CIMG0049.thb.jpg)
![](https://attach.openclonk.org/avatars/24-4666.png)
The textures are in CPattern::sfcPattern32::ppTex. If that surface isn't locked. You might have to unlock it in C4TextureMap::LoadTextures first.
thanks for your help. maybe in 2-3 days i will need to upload my code. but how?
are you able to merge differences from some .cpp-files?
i changed espeacially C4ConfigStartup, StdGL and C4Materials
are you able to merge differences from some .cpp-files?
i changed espeacially C4ConfigStartup, StdGL and C4Materials
![](https://attach.openclonk.org/avatars/29-2030.png)
![](https://attach.openclonk.org/avatars/24-4666.png)
here is the beta of landscape shaders
try in options
you have to import both changesets
try in options
you have to import both changesets
Attachment: Shader-LandscapeOpenclonk.zip (93k)
Attachment: landscape.diff (18k)
Attachment: landscape2.diff (5k)
![](https://attach.openclonk.org/avatars/24-4666.png)
as i said, you can decide in options menu wether this feature will be used or not.
sry for GL_NEAREST bug (see at Newtons post) when not using shaders
shall I fix it or do you want to?
sry for GL_NEAREST bug (see at Newtons post) when not using shaders
shall I fix it or do you want to?
your file dosen't work.
C4AulDebug.cpp:(.text+0x16a4)||undefined reference to `C4AulScriptContext::Dump(StdStrBuf)'|
C4Update.cpp:(.text+0x4dde)||undefined reference to `GetCfg()'|
![](https://attach.openclonk.org/avatars/24-4666.png)
I reinstalled minGW and it works.
3 things:
1. my work is under CC-by, that means my name should by in the sourcecode (as comment)
2. i fixed the nearest-bug without shaders
3. i fixed some undersized Textures
3 things:
1. my work is under CC-by, that means my name should by in the sourcecode (as comment)
2. i fixed the nearest-bug without shaders
3. i fixed some undersized Textures
Attachment: nearestbug.diff (6k)
Attachment: textures.diff (424k)
![](https://attach.openclonk.org/avatars/24-4666.png)
I don't think that we should require power-of-two-textures. The number of cards/drivers that are fast enough for all those blits but don't support GL_ARB_texture_non_power_of_two shouldn't be that big.
You also cannot just change the default TexParameter. PerformBlt relies on the default of GL_NEAREST. We might want to change that because GL_LINEAR is much more common with zoom. DDrawCfg.Shader is also the wrong thing to query, that might be set even without shader support, and the use will be able to choose to use shaders with the old landscape drawing method.
![](https://attach.openclonk.org/avatars/1-0778.png)
you did not activate shaders in options menu
there is also the possibility to add more filters to the shader which also increases image quality (but in your screenshot the shader isn't activated - look in optionsmenu)
there is also the possibility to add more filters to the shader which also increases image quality (but in your screenshot the shader isn't activated - look in optionsmenu)
![](https://attach.openclonk.org/avatars/1-0778.png)
druck s-abf on his keyboard? Look here: fourteenth key to left from esc
![](https://attach.openclonk.org/avatars/24-4666.png)
On the other hand the old liquid animation was kind of unsatisfying, the landscape shadows are still there if the option is disabled, and it's not a big chunk of code, so I'll merge it anyway in a few days if nobody has any objections.
that was is standing here is not what i wanted to reach.
my aim was a weighted map each material with a lower resolution
advantages:
- calcing landscape normals
- less memory need
- better image quality
- no pixel stuck
it would be a good alternative to polygon landscapes.
but i did not reach that target because of not so much knowledge of the CZ-Engine (and such a fatal change would be ..... fatal :) )
my aim was a weighted map each material with a lower resolution
advantages:
- calcing landscape normals
- less memory need
- better image quality
- no pixel stuck
it would be a good alternative to polygon landscapes.
but i did not reach that target because of not so much knowledge of the CZ-Engine (and such a fatal change would be ..... fatal :) )
![](https://attach.openclonk.org/avatars/24-4666.png)
You can also get smooth "landscape normals" by factoring more pixels into the calculation, better image quality by using a better magnification algorithm, and a Clonk can get stuck in an one-quarter pixel just as easily as in a full pixel.
Couldn't you simply use the current implementation and just pretend that a 2x2 block of three earth and one tunnel pixels is one pixel with 3/4 earth to demonstrate your approach?
On the other hand, can I persuade you to implement landscape shadows or liquid animations on top of the current data structure? I could do that myself, but one of the goals of this project is to involve new engine coders :-)
-i'm looking for a good starting point where i can implement landscape shadows, liquid animation etc.
but i do not really think that my current implementation will make it (it's too slow)
-a weighted map means every pixel descripts how many air and how many gold etc. is there. so we do not need such a high landscape resolution
-@landscape normals: see my formula at (i forgot where i put it)
-a clonk can not stuck in pixels that are as large as the clonk itself
hm. i will think over what is the best landscape data structure to get realistic (graphics+physics) results.
but i do not really think that my current implementation will make it (it's too slow)
-a weighted map means every pixel descripts how many air and how many gold etc. is there. so we do not need such a high landscape resolution
-@landscape normals: see my formula at (i forgot where i put it)
-a clonk can not stuck in pixels that are as large as the clonk itself
hm. i will think over what is the best landscape data structure to get realistic (graphics+physics) results.
![](https://attach.openclonk.org/avatars/24-4666.png)
it's an extreme example, but look at gwx, aren't there 5x2x2 voxels as great as one clonk?
![](https://attach.openclonk.org/avatars/24-4666.png)
> i'm looking for a good starting point where i can implement landscape shadows, liquid animation etc.
Well, what do you need? You know already where the main landscape texture is updated, and where it is drawn. If you need more auxiliary textures, I can write code to put specially named landscape textures into the texture array for BlitLandscape, or multiple texturs per material if liquid animations need them.
i'm thinking of an abstraction: how to write a landscape rendering code that is as general as that i just have to write a few lines of code.
in the moment i have to do with gwx network games (yes, they're working!) and so i will wait for newtons polygon landscape implementation.
in the moment i have to do with gwx network games (yes, they're working!) and so i will wait for newtons polygon landscape implementation.
![](https://attach.openclonk.org/avatars/24-4666.png)
Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill