Simple reflex

Posted By: Seriff

Simple reflex - 11/15/05 23:12

Hi, sorry for my ignorance here but, can someone put here a code that works in GS?
A code of a simple reflex shader, even the worst reflex shader can go.
Posted By: Matt_Aufderheide

Re: Simple reflex - 11/16/05 00:59

what is a reflex shader?
Posted By: Steempipe

Re: Simple reflex - 11/16/05 01:32

Maybe a reflection shader??
Posted By: Sebe

Re: Simple reflex - 11/16/05 05:34

Try the environment mapping shader from the wiki, that's kinda reflection shader. Not realtime, but as you said, even the worst would be ok.
Posted By: ello

Re: Simple reflex - 11/16/05 08:17

or use the free gold shaders from my download section. need to update them to dx9 but thats easy and adjust it to your needs
Posted By: Seriff

Re: Simple reflex - 11/16/05 16:18

Thnks to you all.
I've used the environment mapping shader from the wiki, but this one replaces the original skin for the reflect map, how can i keep the skin?
Posted By: Sebe

Re: Simple reflex - 11/16/05 16:59

In the alpha channel you can adjust the reflect map / skin - "mix".
Posted By: Seriff

Re: Simple reflex - 11/16/05 17:08

What alpha channel?
Sorry, but in shaders i'm a complete zero.

Can u tell me what line is?

«bmap bcube=<ritt.bmp>;

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;
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
}
}
";

© 2024 lite-C Forums