ThePentiumGuy
Well-known member
hey
im tryin to learn HLSL(high level shader language)
i just have a bunch of doubts:
1) float4 Pos : POSITION <-- why do u need a ": POSITION" cant you just say POSITION Pos; ?
2)
pass P0
{
CullMode = None;
// shaders
VertexShader = compile vs_1_1 Transform();
PixelShader = NULL;
}
whats the purpose of a pass?.. why cant u just have a technique there
3)
float4x4 WorldViewProj : WORLDVIEWPROJECTION;
float Time = 1.0f;
whats the difference between:
float4, float4x4,.. well i know float ;p
4) last question:
struct VS_OUTPUT
{
float4 pos : POSITION;
float4 diff : COLOR0;
};
VS_OUTPUT Out = (VS_OUTPUT)0;
.. how dose that syntax of the last line work? why would you take "0" and convert it to a VS_OUTPUT type?
---
i used the book Managed DirectX9 Kickstart: Games and Graphics Programming
so if the code looks familiar... yeah
if you can help, heh, thanks
pent
im tryin to learn HLSL(high level shader language)
i just have a bunch of doubts:
1) float4 Pos : POSITION <-- why do u need a ": POSITION" cant you just say POSITION Pos; ?
2)
pass P0
{
CullMode = None;
// shaders
VertexShader = compile vs_1_1 Transform();
PixelShader = NULL;
}
whats the purpose of a pass?.. why cant u just have a technique there
3)
float4x4 WorldViewProj : WORLDVIEWPROJECTION;
float Time = 1.0f;
whats the difference between:
float4, float4x4,.. well i know float ;p
4) last question:
struct VS_OUTPUT
{
float4 pos : POSITION;
float4 diff : COLOR0;
};
VS_OUTPUT Out = (VS_OUTPUT)0;
.. how dose that syntax of the last line work? why would you take "0" and convert it to a VS_OUTPUT type?
---
i used the book Managed DirectX9 Kickstart: Games and Graphics Programming
so if the code looks familiar... yeah
if you can help, heh, thanks
pent