Jump to content

Jmac

Members
  • Posts

    11
  • Joined

  • Last visited

Posts posted by Jmac

  1. I'm trying to move the mesh vertices from the vertex shader in the z axis, I want to try to do the vertex translation on the gpu because of the amount I will need to move in a frame. The white color appears in the proper position but its somewhat transparent and there is that tan plane that appears at the original location that I'm assuming is another set of vertices with the normals for the object where. I don't exactly know why there are two planes or what they are to be honest.


    For instance when I put in object between the white and tan I can see it when I shouldn't but when it's under the tan portion I can't see it so im assuming the tan plane has some lighting attributes.


    Also when I view the white from an angle that the tan is not below it, it doesn't appear.

    screenshot_002-00000.pngpost images


    I haven't been able to find much info on torques rendering system so if anyone could point me in the right direction it would be appreciated.

  2. I'm moving vertices in a very simple shader but for some reason the normals dont move with the vertices and I'm left with an odd effect. Any ideas what is causing this?


    Vertex Shader

    #include "shaders/common/torque.hlsl"
    
    struct Appdata
    {
     float3 position        : POSITION;
     float tangentW        : TEXCOORD3;
     float3 normal          : NORMAL;
     float3 T               : TANGENT;
     float2 texCoord        : TEXCOORD0;
    };
    
    struct Conn
    {
     float4 hpos            : SV_Position;
     float2 texCoord  : TEXCOORD0;
    };
    
    Conn main( Appdata In,
                     uniform float4x4 modelview       : register(C0) )
    {
     Conn Out;
     In.position.z += 20;
     Out.hpos = mul(modelview, float4(In.position, 1.0));
     Out.texCoord = In.texCoord;
     return Out;
    }
    

     

    Pixel Shader

    #include "shaders/common/torque.hlsl"
    
    struct Conn
    {
      float4 hpos            : SV_Position;
      float2 texCoord  : TEXCOORD0;
    };
    
    struct Fragout
    {
      float4 col : SV_Target0;
    };
    
    Fragout main(Conn IN)
    {
      Fragout OUT;
      OUT.col = (255,255,255,1);
      return OUT;
    }
    

     

    What it looks like in game

    screenshot_001-00000.png

  3. What I want to do is step through a console function I added to the engine in VS, so from world editor call the function and then when a break point is hit debug in VS.

  4. Hi, I'm new to using torque 3d and right now I'm just messing around with the engine. I ran into a problem with some of the changes I made to the engine and wanted to know if there is a way to step into the VS debugger from the world editor, I tried the debug() command but it just causes the whole process to freeze. Any information on debugging in general would be appreciated too, thanks.

×
×
  • Create New...