Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
shader development
02-17-2010, 05:54 PM,
#2
 
Playing with the shader I've noticed that the ambient cubemap values can be calculated in the pixel shader.
So we can scrap the ambient map and use the sampler for something else(like normalmaps?).

cubemap: color=textureCube(tu3_cube,ambientmapdir)
[Image: oldhrta2.jpg]

quadratic interpolation: y=1-0.5*(ambientmapdir.y-1)^2, color=0.25*y+0.75
[Image: paras1uhe.jpg]

linear interpolation: color=0.2*ambientmapdir.y+0.8
[Image: linearqg3yg.jpg]

I would go for the quadratic interpolation. It comes quite close to the cubemap version.
Reply


Messages In This Thread
shader development - by NaN - 02-17-2010, 04:32 AM
[No subject] - by NaN - 02-17-2010, 05:54 PM
[No subject] - by joevenzon_phpbb2_import3 - 02-18-2010, 10:45 PM
[No subject] - by NaN - 02-19-2010, 04:46 AM
[No subject] - by joevenzon_phpbb2_import3 - 02-19-2010, 11:26 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)