Jump to content

  • Log In with Google      Sign In   
  • Create Account

Awesome job so far everyone! Please give us your feedback on how our article efforts are going. We still need more finished articles for our May contest theme: Remake the Classics

#ActualTiagoCosta

Posted 15 January 2013 - 03:51 AM

If you just need a constant material color:
Just add a new float4 constant to the shader and store the material color in that constant.
Then multiply it with the ouput of the pixel shader.
return color * IN.shade * mat_color;
If the material color varies bake it into the diffuse color texture or add a second texture to the shader, sample it like the diffuse texture and multiply with the output.

#2TiagoCosta

Posted 15 January 2013 - 03:50 AM

If you just need a constant material color:
Just add a new float4 constant to the shader and store the material color in that constant.
Then multiply it with the ouput of the pixel shader.
return color * IN.shade * mat_color;
If the material color varies bake it into the diffuse color texture or add a second texture to the shader and sample it like the diffuse texture and multiply with the output.

#1TiagoCosta

Posted 15 January 2013 - 03:50 AM

If you just need a constant material color:

Just add a new float4 constant to the shader and store the material color in that constant.

Then multiply it with the ouput of the pixel shader.

return color * IN.shade * mat_color;

 

If the material color varies bake it into the diffuse color or add another texture to the shader sample it like the diffuse texture and multiply with the output.


PARTNERS