Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Don't forget to read Tuesday's email newsletter for your chance to win a free copy of Construct 2!


akaitora

Member Since 05 Sep 2008
Offline Last Active Apr 27 2014 10:28 PM

Posts I've Made

In Topic: CullMode Render State In CG Shading Language

16 March 2014 - 07:50 PM

Hey Buckeye!  Thanks for the idea but it didn't work.  Is there a way to mix HLSL render states in with CgFX?

 

I tried using the hlslv profile for my vertex shader hoping I could use directx runtime states but that didn't work either...  =(

pass p1
{
    cullmode = ccw;

    //VertexShader = compile vs_3_0 myvs2( __model, __view, __modelViewProjection, __deltaTime);
    VertexShader = compile hlslv myvs2( __model, __view, __modelViewProjection, __deltaTime);
    PixelShader = compile ps_3_0 myps2(decalSampler, rampSampler);
}

In Topic: CullMode Render State In CG Shading Language

15 March 2014 - 09:13 PM

Any know?  I know CG is no longer supported by NVidia but many a game used CG and this must have been a pretty common operation for effects.


In Topic: Can you do string compares in Shaders?

18 January 2014 - 07:12 PM

Thanks guys.  Bacterius, your explanation makes a lot of sense.  Now I understand why cg has a string data type.  Thanks again!


In Topic: Not sure what is causing this Visual Artifact

03 September 2013 - 01:45 AM

Good catch!

 

So I solved the problem with your help.  The issue was indeed a Z-Fighting issue.  I was importing an animated/skinned mesh into Maya.  Maya creates a duplicate base mesh for skinned meshes and I was exported all meshes in the scene.  As soon as I unbind the skinned mesh from the original mesh and delete the skinned mesh, the exporter works fine.  Thanks guys!


In Topic: Stuck on some algebra

23 May 2012 - 12:08 PM

Thanks brother Bob. Here are all my steps but I feel like something is wrong in my math


P = (1-t)*((1-t)*A+(t*B)) + t*((1-t)*B+t*C)
P = (1-t)*(A-At + Bt) +t*(B-Bt +Ct)
P = (1-t)*(A-At + Bt) + Bt-Bt^2 +Ct^2
P = (1-t)*(A-At + Bt) + Bt-Bt^2 +Ct^2
P = A*(1-t)-At*(1-t) + Bt*(1-t) + Bt-Bt^2 +Ct^2
P = A-At-At-At^2 + Bt-Bt^2 + Bt-Bt^2 +Ct^2
0 = A-At-At-At^2 + Bt-Bt^2 + Bt-Bt^2 +Ct^2 - P
-Bt+Bt^2 + -Bt+Bt^2 = A-At-At-At^2 + Ct^2 - P
-Bt+Bt^2 + -Bt+Bt^2 = A-At-At-At^2 + Ct^2 - P
-2Bt + 2Bt^2 = A-At-At-At^2 + Ct^2 - P
-2Bt + 2Bt^2 / (t^2) = A-At-At-At^2 + Ct^2 - P / (t^2)
-2Bt + 2B = A-At-At-At^2 + Ct^2 - P / (t^2)
-2Bt + 2B / -2 = A-At-At-At^2 + Ct^2 - P / (t^2 *-2)
Bt + 2B = A-At-At-At^2 + Ct^2 - P / (t^2 *-2)
Bt + 2B / t = A-At-At-At^2 + Ct^2 - P / (t^2 *-2 * t)
B + 2B = A-At-At-At^2 + Ct^2 - P / (t^2 *-2 * t)
3B = A-At-At-At^2 + Ct^2 - P / (t^2 *-2 * t)
3B / 3 = A-At-At-At^2 + Ct^2 - P / (t^2 *-2 * t * 3)
B = (A-At-At-At^2 + Ct^2 - P) / (t^2 *-2 * t * 3)

Does this look right to you?

PARTNERS