10
Mar
08

Superformula 2D-3D Lighting

I’ve finally got simple Phong Directional lighting working with the Superformula 2D-3D shader.
Not sure what I was doing wrong last time I tried this. The best approach seems to be to ignore the HLSL lighting code, and write that stuff from scratch in GLSL. The normal calculation code seems to work in this shader, which leads me to suspect maybe I was going wrong somewhere else when I tried this last time.

Superformula GLSL 2D-3D Lit 01

I’m not entirely convinced this particular shader looks better ‘lit’ than with the fake lighting code I was using before. Certainly, the places where the mesh cuts through itself look much glitchier (and not in a nice way) once directional lighting has been applied. Some of the simpler surfaces may look better though.

Next task is maybe to try and get lighting working in one of the Maths Surfaces shaders. Then I can decide if it’s worth converting the whole set (a long and tedious job, I suspect, given there are 50+ of them).

Advertisements

0 Responses to “Superformula 2D-3D Lighting”



  1. Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Twitter

March 2008
M T W T F S S
« Feb   Apr »
 12
3456789
10111213141516
17181920212223
24252627282930
31  

Links

Blog Stats

  • 470,209 hits

%d bloggers like this: