Jump to content
  • Advertisement
Sign in to follow this  
LukeJ

Need help changing the width of a Vertex shader

This topic is 2784 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
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!