2
\$\begingroup\$

I am making glyphs on a wall "glow", by changing how much of the overlay textures light intensity is blended into the diffuse map. The basic approach is to capture the diffuse map into a render target, and then spritebatch.draw(additive) the light intensity texture on top of it.

This worked great for smaller textures. Now I want to do the same for a larger scene that has massive texture maps. It doesn't make sense to capture all of that just to make some portions "glow".

Is there a better way than to use render targets for a "glowing" effect?

\$\endgroup\$
1
\$\begingroup\$

As Namek says, one way is to bind the overlay texture and do the adding yourself in the pixel shader.
Alternatively, re-render the geometry that contains the glyphs using additive blending and bind the overlay textures instead of the regular ones. Depth test should be enabled, depth writes should be off, and you would need to add a small depth bias to avoid z-fighting.

\$\endgroup\$
1
\$\begingroup\$

You could look at projecting your texture (decal) onto a surface.

Wolfire have a good blog post to get started on decal projection here.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.