   DX built in types do they have normals?
  Do the built in DX shapes teapot ect... have normals, tangents, bitangents you can access from HLSL? I am trying to get a grasp on DX and HLSL. Thanks   
  No, but the D3DX utility library has some ready-to-go functions for generating them.Hope that helps.   ;Quote:Original post by BaSSrafNo, but the D3DX utility library has some ready-to-go functions for generating them.Hope that helps.Ok, but will they setup the required streams for HLSL? I know about CalculateNormals ect... but to my knowledge they were for .x files only... Thanks   ;  The utility functions work on Mesh objects, but before you pass a mesh object into them you need to make sure the initial mesh object actually has a "vertex" format which can hold the normals/tangents etc.. (D3DX has clone functions to do so).You dont have to use multiple streams for the shaders, you can have 1 "vertex" stream which holds interleaved positions-normals-texcoords, the vertex declaration will do the binding (together with the semantics used for the vertex shader's input) - if you want to use multiple streams you will have to generate parallel streams of positions, normals etc.. and adjust your vertex declaration to reflect this. In the first case your data will look like Position followed by a normal followed by a texture coord. The second method you refer to uses separated lists of Positional data, Normals, Tex coords which makes it possible to combine data streams at will.The utility functions described, wont generate seperated streams, but will create 1 vertex structure holding each component.hth :)   ;  As a sidenote, the D3DX built-in meshes do actually have both untransformed positions and normals by default. If you need more components like texture coordinates or tangents, the ID3DXBaseMesh::CloneMesh function is useful for allocating space for them.   ;Quote:Original post by BaSSrafThe utility functions work on Mesh objects, but before you pass a mesh object into them you need to make sure the initial mesh object actually has a "vertex" format which can hold the normals/tangents etc.. (D3DX has clone functions to do so).You dont have to use multiple streams for the shaders, you can have 1 "vertex" stream which holds interleaved positions-normals-texcoords, the vertex declaration will do the binding (together with the semantics used for the vertex shader's input) - if you want to use multiple streams you will have to generate parallel streams of positions, normals etc.. and adjust your vertex declaration to reflect this. In the first case your data will look like Position followed by a normal followed by a texture coord. The second method you refer to uses separated lists of Positional data, Normals, Tex coords which makes it possible to combine data streams at will.The utility functions described, wont generate seperated streams, but will create 1 vertex structure holding each component.hth :)Correct I am using interleaved arrays already. Now the clone functions you speak of what is the name of it I can look up? I would assume its common knowledge whether or not DX has normals for the teapot predefined shape already?;Quote:Original post by Nik02As a sidenote, the D3DX built-in meshes do actually have both untransformed positions and normals by default.great this is what I was looking for. So with a HLSL shader I can do OutputVS ColorVS(float3 pos : POSITION0, float3 normal : NORMAL0, float2 texCoord : TEXCOORD0)Thanks   ;  Yes, i'm sorry, its the texture coords they come without. sorry for the confusion.   ;  The Clone function is a method of the Mesh object to which you pass the desired FVF. (lol, again sorry for the confusion, i'm a bit rusty :P)Mesh->CloneMeshFVF();edit: which I notice nik02 already wrote.. :)   ;  On a side note, with the D3DLIGHT9 when you setup for a directional light and fillout the light struct's parameters, do I need to send this data to the VS? or can I use some built in already variable in HLSL to access that light's direction or position? Because in GLSL I can and was wondering if this was the same. Thanks again.   