Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

FPSC Classic Scripts / shader does not work

Author
Message
wizard of id
18
Years of Service
User Offline
Joined: 16th Jan 2006
Location: Sunny South Africa
Posted: 14th Feb 2006 21:38
Hi guys what are the engine limits concerning shaders.In other words what shaders can not be render via the engine.

Here is a sample of the shader I'm trying to use using.

If I have missed some thing on the forum sorry.
himynameisali
21
Years of Service
User Offline
Joined: 9th Nov 2003
Location: England, You...Rastards!
Posted: 18th Feb 2006 14:14
it may depend on what graphics card you've got, what graphics card have you got?

asm1992 - Formally known as Ali M .
Davy B
18
Years of Service
User Offline
Joined: 9th Feb 2006
Location: West Berkshire (UK)
Posted: 20th Feb 2006 15:40
i tried the shader but it doesn't work, My card is ATI Radeon 9200se
It say it needs 2.0 shader, i think i only got 1.1 shader
wizard of id
18
Years of Service
User Offline
Joined: 16th Jan 2006
Location: Sunny South Africa
Posted: 20th Feb 2006 19:10
Thanks I have a gigabyte 6600 256mb Turbo edition
So pixel and vertex shader 3

The shader code once again.


texture mtlSkin1; //should be light grey
matrix matWorldViewProj;
matrix matWorld;
matrix matWorldView;
vector vecSkill1;
vector vecSkill41;
vector vecFog;
vector vecSunDir;

technique shadowblur
{
pass p0
{
texture[0]=<mtlSkin1>;


zWriteEnable=false;
alphaBlendEnable=true;

srcblend=destcolor;
destblend=zero;

vertexShaderConstant[0]=<matWorldViewProj>;
vertexShaderConstant[4]=<matWorld>;
vertexShaderConstant[8]=<matWorldView>;
vertexShaderConstant[16]=<vecSkill41>; // shell_distance, 0, fur_u_scale, fur_v_scale
vertexShaderConstant[17]={0.0,0.0,0.0,0.0}; // shell_number
vertexShaderConstant[19]=<vecSunDir>;
vertexShaderConstant[20]=<vecFog>;
vertexShaderConstant[94]=<vecSkill1>; // first_shell_brightness, brightness_increment, 0, 0
vertexShaderConstant[95]={0.5,1.0,2.0,0.0};

vertexShader =

asm
{
vs.1.1

dcl_position v0
dcl_normal v3
dcl_texcoord1 v7 //color uv

mov r0,v0
mov r1,c16
mul r1,r1.x,c17.x // shell distance * shell number
mul r1,r1,v3 // scale normal
add r0.xyz,r0.xyz,r1.xyz // shell offset (vertex position + scaled normal}

m4x4 oPos,r0,c0 // transform position to clip space
mov oT0,v7 // output uvs

mov r1.w,c20.w // r1.w=1
dp4 r0,v0,c10 // distance to camera position
add r0,r0,-c20.x // distance-fog_start
mad r0.x,-r0.x,c20.z,r1.w // 1-(distance-fog_start}*(1/(fog_end-fog_start}}
max oFog,r0.x,c95.w // clamp with custom max value

};


pixelShader=
asm
{
ps.1.1


tex t0 // sample colormap
Origin
19
Years of Service
User Offline
Joined: 11th Sep 2005
Location:
Posted: 24th Feb 2006 12:37 Edited at: 24th Feb 2006 12:39
fpsc uses 4X4!

EDIT:

technique shadowblur
{
pass p0
{

There is no use tryibg to pass an emty var!

Why should you care?

WWW.BREAK.COM
wizard of id
18
Years of Service
User Offline
Joined: 16th Jan 2006
Location: Sunny South Africa
Posted: 24th Feb 2006 18:39
Thanks
I will give it a try.

Login to post a reply

Server time is: 2024-11-21 21:50:24
Your offset time is: 2024-11-21 21:50:24