View Full Version : luminance maps

08-17-2006, 04:50 AM
ok so far i have a first pass in which i render depth only, then i render one pass for each light source and blend these together. now i'd like to add support for luminance maps (is this the correct term?) for samples that are to be rendered in full brightness (for computer monitors etc).

what's the most eficient way to do this? will i need an extra pass for this?


08-17-2006, 11:11 PM
just use emission in the shader eg quasi code

float amount = diffuse + tex2d( luminance ).x;
amount = clamp( amount,0,1);
gl_FragColor.xyz = tex2d( texture_sample ) * amount;

// diffuse is just your normal shading
// luminance ala emission ala ambient is how much extra lighting u want added