Hello,
I hope this is not too stupid, but here it goes:
I often get things like this, like the color depth is very low:
Is there a basic setting I missed, or are these things more complicated than that?
color changes not smooth
-
- Posts: 377
- Joined: Fri Oct 28, 2005 10:28 am
- Contact:
hettar, please provide more informations. This image only tells us, that banding occurs for you, but not, when, where in what situations.
So what do we see on the picture? What is the relevant code snippet you used to create this, mainly material settings/shader code (if any) and a textual description of what you want to achieve.
So what do we see on the picture? What is the relevant code snippet you used to create this, mainly material settings/shader code (if any) and a textual description of what you want to achieve.
i have seen this if the graphic card setting for openGl quality is 'low' (would -properly- be something similar for dx?)
-eg are u sure this is an IRR problem?
Try to look at the default setting for ur graphic card
-eg are u sure this is an IRR problem?
Try to look at the default setting for ur graphic card
Regards.
Tech: win98se| 320mb ram| abitbe6| 433mhzceleron| atiRadeon7000.64mb| soundblaster125| dx9.0b | devCPP | IRR 0.12.0 |
Tech: win98se| 320mb ram| abitbe6| 433mhzceleron| atiRadeon7000.64mb| soundblaster125| dx9.0b | devCPP | IRR 0.12.0 |
Thanks for the replies! It's at least nice to know it's called banding, that should make searching for an answer a lot easier.
I guess it's not really an IRR problem (I remember seeing the same behavior in an irrlicht example, but can't find it anymore), but I hoped someone would react with 'Oh yeah, you forgot to set the MAT_SMOOTH parameter' or something :P
The picture is a part of a terrainmesh, rendered with DX9 and a hlsl shader; when I leave out the atmosphere stuff, the shader is something like this:
Any ideas?
I guess it's not really an IRR problem (I remember seeing the same behavior in an irrlicht example, but can't find it anymore), but I hoped someone would react with 'Oh yeah, you forgot to set the MAT_SMOOTH parameter' or something :P
The picture is a part of a terrainmesh, rendered with DX9 and a hlsl shader; when I leave out the atmosphere stuff, the shader is something like this:
Code: Select all
float4x4 matViewProjection;
float3 vSunPosition;
struct VS_INPUT
{
// (I currently use a vertex type with no tex coords or color)
float4 Position: POSITION0;
float3 Normal: NORMAL0;
};
struct VS_OUTPUT
{
float4 Position: POSITION0;
float3 Normal: NORMAL0;
};
VS_OUTPUT vs_main(VS_INPUT Vert)
{
VS_OUTPUT Out;
Out.Normal = Vert.Normal;
Out.Position = mul(Vert.Position, matViewProjection);
return Out;
}
struct PS_INPUT
{
float3 Normal: NORMAL0;
};
float4 ps_main(PS_INPUT Pix): COLOR0
{
float4 color = {0.4, 0.7, 0.2, 1};
float terrain_lit = dot(normalize(vSunPosition), normalize(Pix.Normal));
color = color * (0.4 + 0.7 * terrain_lit);
return color;
}
I'm still a bit in the dark about this..
if I simply set the normals as colors
I get this:
Where could all the green/pink bands come from?
if I simply set the normals as colors
Code: Select all
float4 ps_main(PS_INPUT Pix): COLOR0
{
float4 color = {1, 1, 1, 1};
color = color * normalize(Pix.Normal);
return color;
}
Where could all the green/pink bands come from?
I guess noone finds this interesting :)
I mostly got rid of the effect by disabling the stencil buffer, though the banding is still visible when I look very closely. But I guess that's normal, because I also see it when I simply add a TestSceneNode with directional lighting to the HelloWorld example (not so clear as in the above screen shots of course). Ah well.
I mostly got rid of the effect by disabling the stencil buffer, though the banding is still visible when I look very closely. But I guess that's normal, because I also see it when I simply add a TestSceneNode with directional lighting to the HelloWorld example (not so clear as in the above screen shots of course). Ah well.