Skip to main content
GameDev.net gamedev.net
🔒 Locked

multipass texture rendering how ?

Started by DMINATOR Aug 29, 2006 at 5:08 PM 1 replies 1.1k views
Original Post
DMINATOR
DMINATOR
Hi I am having some problems understanding how to combine and render textures in multiple passes. Here are some textures I am trying to combine: After DOT 3 bump map Ambient map, just to make some parts of the image glow in the dark Specular pass - just adds some simple highlights Diffuse map Can anyone help out, atleast pointing out to the sources where blending multiple textures is explained more deeply. Source code would be also greatly appreciated. Thank you for any help.
Digitalfragment
Digitalfragment
Render your DOT3 map using Blend( ONE, ZERO )
Render your Diffuse using Blend( DST_COLOR, ZERO )
Render your Ambient using Blend( SRC_ALPHA, ONE )

You'll need to work out a way of combining your specular pass with the normalmap (otherwise it wont take that into consideration), but that can be added on top exactly like the ambient map.
DMINATOR
DMINATOR
Quote:
Original post by Exorcist
Render your DOT3 map using Blend( ONE, ZERO )
Render your Diffuse using Blend( DST_COLOR, ZERO )
Render your Ambient using Blend( SRC_ALPHA, ONE )

You'll need to work out a way of combining your specular pass with the normalmap (otherwise it wont take that into consideration), but that can be added on top exactly like the ambient map.


Thank you for your suggestion, I got it working , but I am having a problem with ambient texture:




I a m trying to store it as grayscale alpha channel in normal map. But it always renders with normal texture. I have no idea how to fix that.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.