Sign in to follow this  

Need help changing the width of a Vertex shader

This topic is 2602 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

RangeVS_OUTPUT RangeVS(
#ifndef XBOX
RangeVS_INPUT In
#else
int index : INDEX
#endif
)
{
#ifdef XBOX
RangeVS_INPUT In = CreateRangeVertexInput( index );
#endif

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

// Scale the vertex based on requested range, and add in the instanced position
#if FEATHER_OUT
In.Vertex.xy *= dot( In.AlphaScalar.yz, float2( In.Radius.y, In.Radius.y + FogIntel.z ) );
#endif
#if FEATHER_IN
In.Vertex.xy *= dot( In.AlphaScalar.yz, float2( max( 0.0f, In.Radius.y - FogIntel.z ), In.Radius.y ) );
#endif
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 );
#if FEATHER_OUT
Out.Color = In.AlphaScalar.xxxx;
#endif
#if FEATHER_IN
Out.Color = float4( 1.0f, 1.0f, 1.0f, 1.0f ) - In.AlphaScalar.xxxx;
#endif

// Return our finished product
return Out;
}

Share this post


Link to post
Share on other sites

This topic is 2602 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this