Jump to content
  • Advertisement
Sign in to follow this  

Modulating specular value

This topic is 5225 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

You can try this:

Set d3drs_specularenable to false.
In texture stages, do modulate, texture, specular.

This is supposed to be fine, though, apparently, some cards don't interpolate specular when specularenable is false. The trouble is that specularenable controls multiple things.

1. Generating specular values per vertex
2. Enabling interpolating specular across the polygon
3. Performing a specular add after the texture stages

If you're using a vertex shader (you didn't say), and your specular is greyscale or white, you could output specular as diffuse.a, and use alphareplicate to get it into color channels, or just use the alpha to blend in the gloss map.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!