2 sided shader is odd

   3011   2   1
User Avatar
Member
196 posts
Joined: July 2005
Offline


This is created using the supplied 2 sided vex shader. The geometry is kind of an extruded L shape.

One sides supposed to constant Red and the other constant blue.

Why is it doing this? Does it need thickness to work properly?

H
Henster
User Avatar
Member
11 posts
Joined: July 2005
Offline
Hello, Henster

I think i've got it:

First: Maybe there are to many polygons,so you have to delete the
Non-four-point polygons

Second: In the vex surface builder you have to tell the Two-Sided-op,
where is the front face (take front face op)
and from the global variables op pipe out from “p” (surface
position) into “N” the surface normal input of the front face op.


Maybe there is a better way, but it works.

I hope this helps.
User Avatar
Member
196 posts
Joined: July 2005
Offline
I discovered the problem.

The two sided shader uses N by default which is an interpolated normal. Instead Ng (the geometric normal) was used and everything was peachy! 8)
Henster
  • Quick Links