Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualHodgman

Posted 31 October 2012 - 06:36 AM

Hm, they use alpha testing for the normals only.

They say that they were originally using alpha testing, but then switched to blending with the blend mode of:
result.rgb = src.rgb * src.a + dst.rgb * (1-src.a)
result.a   = src.a  * factor + dst.a   * (1-src.a)
where factor is set to the material's spec power. Obviously this doesn't work if you want the spec-power to vary across the decal though.
N.B. this relies on EXT_blend_func_separate.

I wonder how they did it here (that's what I'm looking for): http://blog.wolfire....tor-part-three/

This one doesn't mention deferred lighting, so it doesn't deal with your spec-power blending issue. In his level editor, he's pre-generating a world-space normal map per decal instance (which is a mixture of the underlying geometric normals, and the decals tangent-space normals), and saving those texture alongside the level.

#4Hodgman

Posted 31 October 2012 - 06:30 AM

Hm, they use alpha testing for the normals only.

They say that they were originally using alpha testing, but then switched to blending with the blend mode of:
result.rgb = src.rgb * src.a + dst.rgb * (1-src.a)
result.a   = src.a  * factor + dst.a   * (1-src.a)
where factor is set to the material's spec power.
N.B. this relies on EXT_blend_func_separate.

I wonder how they did it here (that's what I'm looking for): http://blog.wolfire....tor-part-three/

This one doesn't mention deferred lighting, so it doesn't deal with your spec-power blending issue. In his level editor, he's pre-generating a world-space normal map per decal instance (which is a mixture of the underlying geometric normals, and the decals tangent-space normals), and saving those texture alongside the level.

#3Hodgman

Posted 31 October 2012 - 05:36 AM

Hm, they use alpha testing for the normals only.

They say that they were originally using alpha testing, but then switched to blending with the blend mode of:
result.rgb = src.rgb * src.a + dst.rgb * (1-src.a)
result.a   = factor          + dst.a   * (1-src.a)
where factor is set to the material's spec power.
N.B. this relies on EXT_blend_func_separate.

I wonder how they did it here (that's what I'm looking for): http://blog.wolfire....tor-part-three/

This one doesn't mention deferred lighting, so it doesn't deal with your spec-power blending issue. In his level editor, he's pre-generating a world-space normal map per decal instance (which is a mixture of the underlying geometric normals, and the decals tangent-space normals), and saving those texture alongside the level.

#2Hodgman

Posted 31 October 2012 - 05:30 AM

Hm, they use alpha testing for the normals only.

They say that they were originally using alpha testing, but then switched to blending with the blend mode of:
result.rgb = src.rgb * src.a + dst.rgb * (1-src.a)
result.a   = factor		  + dst.a   * (1-src.a)
where factor is set to the material's spec power.
N.B. this relies on EXT_blend_func_separate.

I wonder how they did it here (that's what I'm looking for): http://blog.wolfire....tor-part-three/

This one doesn't mention deferred lighting, so it doesn't deal with your spec-power blending issue. In his level editor, he's pre-generating a world-space normal map per decal instance (which is a mixture of the underlying geometric normals, and the decals tangent-space normals), and saving those texture alongside the level.

#1Hodgman

Posted 31 October 2012 - 05:28 AM

Hm, they use alpha testing for the normals only.

They say that they were originally using alpha testing, but then switch to blending with the blend mode of:
result.rgb = src.rgb * src.a + dst.rgb * (1-src.a)
result.a = factor + dst.a * (1-src.a)
where factor is set to the material's spec power.
N.B. this relies on EXT_blend_func_separate.

I wonder how they did it here (that's what I'm looking for): http://blog.wolfire.com/2009/06/decals-editor-part-three/

This one doesn't mention deferred lighting, so it doesn't deal with your spec-power blending issue. In his level editor, he's pre-generating a world-space normal map per decal instance (which is a mixture of the underlying geometric normals, and the decals tangent-space normals), and saving those texture alongside the level.

PARTNERS