Game Development Community

Red Shader

by arda · in Torque Game Engine Advanced · 05/03/2005 (4:24 pm) · 2 replies

Hi,

I tried to implement red shader as in Antony's topic at http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=5868

I used healtKit shape and I'm getting error below, and using ATI9600.
Mapping string: MissionStartPhase1Ack to index: 0
Warning: shape terrain_gen/data/shapes/test/newBox2.dts collision detail 0 (Collision-1) bounds exceed that of shape.
error X4545: vs_2_0 target does not support texture lookups

The changes I made are

materials.cs
datablock CustomMaterial(aRedShader)
{
	texture[0]	= "~/data/shapes/test/healthKit";
	shader = Red11Shader;
	version = 2.0;
};

materialMap.cs
addMaterialMapping("heatlhKit", "material: Red11Shader");

shaders.cs
// ttunc
datablock ShaderData(Red11Shader)
{
	DXVertexShaderFile	= "shaders/redV.hlsl";
	DXVertexShaderFile	= "shaders/redP.hlsl";
	pixVersion			= 2.0;
};

I also copied red shader from antony's topic.

can this be because of the TSE could not be able to determine graphics card capabilities?

Initializing GFXCardProfiler (D3D9)
   o Vendor : 'ATI Technologies Inc. (Omega 2.6.05a)'
   o Card   : 'ATI MOBILITY RADEON 9600/9700 Series AGP (0x4E50)'
   o Version: '65.05'
   - Scanning card capabilities...
GFXCardProfiler (D3D9) - Setting capability 'autoMipMapLevel' to true.
   - Loading card profiles...
      - Exec'ing profile/D3D9.cs
      - Exec'ing profile/D3D9.ATITechnologiesIncOmega2605a.cs
GFXCardProfiler (D3D9) - Setting capability 'autoMipmapLevel' to false.
      - No profile/D3D9.ATITechnologiesIncOmega2605a.ATIMOBILITYRADEON96009700SeriesAGP0x4E50.cs
      - No profile/D3D9.ATITechnologiesIncOmega2605a.ATIMOBILITYRADEON96009700SeriesAGP0x4E50.6505.cs
Thanks

-tunca

#1
05/05/2005 (10:14 am)
The first line implies the shader was not implemented correctly (did you add the texture lookups to the vertex shader instead of the pixel shader? make sure your file names are correct with the correct code):

error X4545: vs_2_0 target does not support texture lookups

And change the below line to point to your defined material, not the shader (also make sure the 'health' name is correct with what you have, it appears to have a typo above):

addMaterialMapping("healthKit", "material: aRedShader");

The other lines you posted, such as the bounding box issue on the newBox2 and your card info shouldnt be causing issues with this.

Also, I believe this shader may be 1.1 compatable, compiling at the lower version (rather than 2.0) may yield some speed increases.
#2
05/05/2005 (1:30 pm)
@Jameson

Thanks, I'll give it a try. I was not sure what is wrong with the shader code since I did not implemented a shader with TSE.
But when I get used to it I'll try to implement some of the shaders around, and I believe it'll be fun.

cheers