Game Development Community

dev|Pro Game Development Curriculum

Adding detail textures to Atlas2

by Matt Vitelli · 07/11/2006 (12:04 pm) · 8 comments

Surprisingly enough this only requires a single line of code to change.

In shaders/atlas/atlasSurfaceP.hlsl change

OUT.col = lerp(diffuseColor, fogCol, fogCol.a ); //* (detailCol + 0.6);

to

OUT.col = lerp( diffuseColor * (detailCol + 0.6), fogCol, fogCol.a );

#1
07/12/2006 (9:13 am)
What's a lerp()? ROTFL
We couldn't help it. We are still laughing!
#2
07/13/2006 (2:10 am)
I Have a totally black terrain with this update. But... replacing this line with :
OUT.col = lerp( diffuseColor * (detailCol + 0.6), fogCol, fogCol.a );
It works for me :).
#3
07/13/2006 (3:22 am)
Vincent's update is correct. :)
#4
07/13/2006 (10:31 am)
Has the CVS been changed? I copied that directly from mine.

Edit: Resource changed.
#5
11/29/2006 (10:33 am)
@Shon LERP = Linear Interpolation.
#6
11/29/2006 (11:11 am)
Alright Finally I know.
#7
11/30/2006 (3:25 am)
Was just trying this out, and this seems to be part of the atlas shader already, as defined in /example/shaders

There isnt an atlasSurfaceP.hlsl in /shaders/atlas, and we've still got no detail texture. the detail texture as defined in the atlas2 engine object doesnt even look like it gets used, let alone packed/unpacked. What am I missing here?
#8
11/30/2006 (6:03 am)
This resource was pretty much useless after milestone 4 came out. Detail textures were scrapped and a lot of the Atlas2 code was rewritten.