• Advertisement
Sign in to follow this  

Need help changing the width of a Vertex shader

This topic is 2664 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi im trying to change the width of a Vertex shader it deals with the intel rings the thickness is to much i would like to half the size of them, any help would be great thanks
code is bellow or full hlsl here http://www.box.net/shared/uqlt3qg5yg

// Vertex shader

#ifndef XBOX
int index : INDEX
#ifdef XBOX
RangeVS_INPUT In = CreateRangeVertexInput( index );

// Output from vertex shader
RangeVS_OUTPUT Out = (RangeVS_OUTPUT)0;

// Scale the vertex based on requested range, and add in the instanced position
In.Vertex.xy *= dot( In.AlphaScalar.yz, float2( In.Radius.y, In.Radius.y + FogIntel.z ) );
In.Vertex.xy *= dot( In.AlphaScalar.yz, float2( max( 0.0f, In.Radius.y - FogIntel.z ), In.Radius.y ) );
In.Vertex.xy += In.Position.xy - 1;

// Scale the values by the map dimensions and then map to [-1,1]
In.Vertex.xy *= FogIntel.xy;
In.Vertex.xy = In.Vertex.xy * 2 - 1;

// Transform vertex to homogenous clip space
Out.Position = float4( In.Vertex.x, -In.Vertex.y, 1.0f, 1.0f );
Out.Color = In.AlphaScalar.xxxx;
Out.Color = float4( 1.0f, 1.0f, 1.0f, 1.0f ) - In.AlphaScalar.xxxx;

// Return our finished product
return Out;

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement