You can use a one instruction line : diffuseColor = tex2D(g_TopSampler,IN.UV0.xy);diffuseColor = (diffuseColor != 0) ? diffuseColor : float4(1,1,1,1); the ?: translates to 1 asm instruction
Just testing my pipe materials. 2 textures for each color material. Same tiling diffuse(mostly pure white and a little bit of AO), detail normal, and spec/gloss. Just uses the DiffuseColor option to add the color.
thx Drew++ for your explanation :) During my work on that specular lighting I've found a bug in my shader, whenever I put a light between my models the outer one will be lit like the inner one? I think a picture describes this better: and my lambert shader:////////////////////////////////////////////////////////////////…
Hey, thanks for the suggestion. I ended up creating a 512 tileable diffuse, spec/gloss, and detail normal. The diffuse is almost pure white with a little bit of AO. I just made new materials for each color and used the same texture with variation in the DiffuseColor parameter. I tried Vertex Colors before, but it didn't…
deferred shading IS NOT SAME AS indirect lighting indirect lighting takes the scene's geometry into account, whilst deferred shading can only lit what is "visible" in the current frame. With deferred shading the main benefit is indeed that you can do multiple lights on screen at much lower costs. The major drawback is that…