Sign in to follow this  

Need help changing the width of a Vertex shader

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

// 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

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