Jump to content

  • Log In with Google      Sign In   
  • Create Account


belfegor

Member Since 05 Jun 2007
Online Last Active Today, 01:26 AM

Posts I've Made

In Topic: Efficient way to read .obj files in Visual Studio 2013

Yesterday, 06:46 AM

^ +1

 

Usually obj, 3ds, fbx... are used as "interchange" formats so you can easily transfer/edit across multiple programs since they are well known/supported for import/export, but for your project/game you want to use your own binary format structured in a way that holds only data relevant for your needs, you can even merge multiple models/textures/whatever files in one file to reduce disk I/O count and make it even faster on load.


In Topic: Cannot render the navigation mesh

16 August 2014 - 04:43 PM

I created simple class for you that wrap whole thing in one place

 

http://pastebin.com/SigypwK3

 

and then you can write simple shader to draw with:

 

float4x4 WorldViewProjection;
 
struct VERTEX
{
    float3 Position : POSITION;
    float3 Color    : COLOR;
};

struct V2P
{
    float4 Position : POSITION;
    float3 Color    : COLOR;
};
 
struct P2A
{
    float4 Color : COLOR;
};

void vs(in VERTEX IN, out V2P OUT)
{
    OUT.Position = mul(float4(IN.Position.xyz, 1.0f), WorldViewProjection);
    OUT.Color = IN.Color;
}

void ps(in V2P IN, out P2A OUT)
{
    OUT.Color = float4(IN.Color, 1.0f);
}
 
technique Tech
{
    pass p0
    {
        VertexShader = compile vs_3_0 vs();
        PixelShader = compile ps_3_0 ps();
    }
}

In Topic: Convert view space to world space issues

16 August 2014 - 03:12 PM

That seems fine, there must be something else wrong then. wacko.png


In Topic: Convert view space to world space issues

16 August 2014 - 02:23 PM

You cannot have 2 pixel shaders run simultaneously, you probably meant "helper" function. If you don't want to post whole shader at least show me the whole "pipeline" for uv coordinates (how it is calculated/obtained). I suspect at this because the rest of code is correct.

 

It doesn't matter if you are in "post-processing stage", you must have vertex shader, even if you dont set it yourself it is possible that it is set for you behind scene/implicitly by their shader system.


In Topic: Cannot render the navigation mesh

16 August 2014 - 07:15 AM

You need to debug further.

How do you build your VB now? rcPolyMeshDetail might be like indexed mesh but you draw your debug mesh without indices so you need to be careful how to extract/fill correct data into it as no vertices are "shared" that way.


PARTNERS