|
|
webGL
by Ice2642. 11/17/25 21:27
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Reflaction map
#31799
08/09/04 17:31
08/09/04 17:31
|
Joined: Mar 2004
Posts: 70
Matan_Golan_A6
OP
Junior Member
|
OP
Junior Member
Joined: Mar 2004
Posts: 70
|
hi,
some one can give me a code of Reflaction shading??
thanks!
Last edited by Matan_Golan_A6; 08/09/04 17:34.
|
|
|
Re: Reflaction map
[Re: Matan_Golan_A6]
#31800
08/09/04 18:23
08/09/04 18:23
|
Joined: Mar 2004
Posts: 202 Germany
zSteam_
Member
|
Member
Joined: Mar 2004
Posts: 202
Germany
|
hi here is my german code :
bmap bcube=<cube+6.tga>;
function mtl_envmap_view() { mat_set(mtl.matrix,matViewInv); mtl.matrix41=0; mtl.matrix42=0; mtl.matrix43=0; }
function mtl_envmap_init() { //...maybe you should copy the mat_model properties here... bmap_to_cubemap(mtl.skin1); mtl.event=mtl_envmap_view; mtl.enable_view=on; }
material mtl_envmap { skin1=bcube; event=mtl_envmap_init;
effect= " texture entSkin1; texture mtlSkin1; matrix matMtl; technique envmap { pass p0 { texture[0]=<entSkin1>; texture[1]=<mtlSkin1>;
zWriteEnable=true; alphaBlendEnable=false;
colorArg1[0]=Texture; colorOp[0]=Modulate2x; colorArg2[0]=Diffuse;
colorArg1[1]=Texture; textureFactor=0x90FFFFFF; // -> C0=75%, 80=50%, 40=25% (alpha) colorOp[1]=blendFactorAlpha; addressU[1]=Clamp; addressV[1]=Clamp; texCoordIndex[1]=cameraSpaceReflectionVector; textureTransformFlags[1]=Count3; textureTransform[1]=<matMtl>; // transform camera space back to world space } } "; }
action cubic { my.shadow=on; my.material=mtl_envmap; }
/////////////////////////////////////////////////////////////////////////////////////////////////////////
function mtl_enmap_view() { mat_set(mtl.matrix,matViewInv); mtl.matrix41=0; mtl.matrix42=0; mtl.matrix43=0; }
function mtl_enmap_init() { //...maybe you should copy the mat_model properties here... bmap_to_cubemap(mtl.skin1); mtl.event=mtl_enmap_view; mtl.enable_view=on; }
material mtl_enmap { skin1=bcube; event=mtl_enmap_init;
effect= " texture entSkin1; texture mtlSkin1; matrix matMtl; technique enmap { pass p0 { texture[0]=<entSkin1>; texture[1]=<mtlSkin1>;
zWriteEnable=true; alphaBlendEnable=false;
colorArg1[0]=Texture; colorOp[0]=Modulate2x; colorArg2[0]=Diffuse;
colorArg1[1]=Texture; colorOp[1]=blendCurrentAlpha; addressU[1]=Clamp; addressV[1]=Clamp;
texCoordIndex[1]=cameraSpaceReflectionVector; textureTransformFlags[1]=Count3; textureTransform[1]=<matMtl>; // transform camera space back to world space } } "; }
action chrom { my.shadow=on; my.material=mtl_enmap; }
A6 Commercial 6.50.6
|
|
|
Re: Reflaction map
[Re: Matan_Golan_A6]
#31804
08/10/04 17:24
08/10/04 17:24
|
Joined: Nov 2003
Posts: 677 There
Julius
Developer
|
Developer
Joined: Nov 2003
Posts: 677
There
|
i'm pretty sure you can't do realtime reflections on entities without CEM (Cubic Environment Mapping)
Julian
flabadabadab.
|
|
|
|
|
|
|