b1s
Member
|
proper refraction
Would be nice to have a refraction shader that uses normal maps for the refraction deformations.
|
|
07-11-2010 06:22 PM |
|
ID0
Member
|
RE: proper refraction
Yes, that would be super!
|
|
07-15-2010 07:50 AM |
|
Esenthel
Administrator
|
RE: proper refraction
you have a tutorial for normal map shader, and a tutorial for refraction, so you can combine them both together (when having license)
|
|
07-15-2010 10:07 AM |
|
b1s
Member
|
RE: proper refraction
hmm.. havent noticed a normal map shader tutorial.. have look in to that.
|
|
07-15-2010 02:49 PM |
|
Esenthel
Administrator
|
RE: proper refraction
shaders\09 - Advanced Shaders in Solid Render Mode.cpp
|
|
07-15-2010 03:07 PM |
|
b1s
Member
|
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.
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 |
|
Esenthel
Administrator
|
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 |
|
b1s
Member
|
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 |
|
Esenthel
Administrator
|
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 |
|
b1s
Member
|
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.. but ill let you know how it progresses.
|
|
07-25-2010 08:58 PM |
|