About Store Forum Documentation Contact
Donations:
309$/mo



Post Reply 
proper refraction
Author Message
b1s Offline
Member

Post: #1
proper refraction
Would be nice to have a refraction shader that uses normal maps for the refraction deformations.
07-11-2010 06:22 PM
Find all posts by this user Quote this message in a reply
ID0 Offline
Member

Post: #2
RE: proper refraction
Yes, that would be super!
07-15-2010 07:50 AM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #3
RE: proper refraction
you have a tutorial for normal map shader, and a tutorial for refraction, so you can combine them both together smile (when having license)
07-15-2010 10:07 AM
Find all posts by this user Quote this message in a reply
b1s Offline
Member

Post: #4
RE: proper refraction
hmm.. havent noticed a normal map shader tutorial.. have look in to that.
07-15-2010 02:49 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #5
RE: proper refraction
shaders\09 - Advanced Shaders in Solid Render Mode.cpp
07-15-2010 03:07 PM
Find all posts by this user Quote this message in a reply
b1s Offline
Member

Post: #6
RE: proper refraction
okay so.. ive been trying to create this shader by combining those two.
its proving to be quite difficult but here's what i got so far.


[Image: refraction.jpg]

The image is a bit dark but you can get the point from this one.
There is a plane with normal map and backbuffer as diffuse color.
the problem is that the same plane is also rendered to the back buffer as black.
is it possible to get rid of this somehow?
(This post was last modified: 07-25-2010 02:09 PM by b1s.)
07-25-2010 02:09 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #7
RE: proper refraction
aren't you rendering the black plane too many times?
you should draw it only once in RM_BLEND, check the refraction tutorial, the skeleton model is drawn only once.
07-25-2010 03:49 PM
Find all posts by this user Quote this message in a reply
b1s Offline
Member

Post: #8
RE: proper refraction
well i don't know how to get from the refraction tutorial to rendering normal maps while rendering in blend mode.
i started from the advanced solid shader tutorial and added the backbuffer to that color.
ended up with this problem.
07-25-2010 05:52 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #9
RE: proper refraction
you should use the blend mode refraction tutorial, and to it, add only normal map support from the advanced shader tutorial.
copy only stuff related to normal maps (tangents, binormals, normal map access, ...)
07-25-2010 06:15 PM
Find all posts by this user Quote this message in a reply
b1s Offline
Member

Post: #10
RE: proper refraction
well ill have to try that.. they are just so hard to understand because they use so very different methods.. and i just suck with shaders.. grin but ill let you know how it progresses.
07-25-2010 08:58 PM
Find all posts by this user Quote this message in a reply
Post Reply