Hi there,
may CG be render on Direct3D Render System but not on OpenGL Render System?
what cause this problem?
i tried to convert CG to GLSL but i got same result. it cant render on OpenGL
CG Profile: arbvp1, vs_2_x, arbfp1, ps_2_x
Supported Shader Profiles OpenGL : arbfp1 arbvp1 glsl
Supported Shader Profiles Direct3D: hlsl ps_1_1 ps_1_2 ps_1_3 ps_1_4 ps_2_0 ps_2_a ps_2_b ps_2_x ps_3_0 vs_1_1 vs_2_0 vs_2_a vs_2_x vs_3_0
CG Problem
-
- Orc Shaman
- Posts: 788
- Joined: Mon Jan 18, 2010 6:06 pm
- Location: Costa Mesa, California
- x 24
Re: CG Problem
CG can render to both
- Kojack
- OGRE Moderator
- Posts: 7157
- Joined: Sun Jan 25, 2004 7:35 am
- Location: Brisbane, Australia
- x 534
Re: CG Problem
CG supports opengl and directx.
How is it not working on opengl? Is it crashing? Is there an error in the ogre.log?
Also make sure you are using the correct keyword to define the profiles. CG uses "profiles" while directx uses "target" (don't know why ogre does that, it annoys me).
If you could post the material and shader here, we can have a look.
How is it not working on opengl? Is it crashing? Is there an error in the ogre.log?
Your material doesn't list them like that does it? arbvp1 and vs_2_x are vertex shader profiles, arbfp1 and ps_2_x are fragment shader profiles. They can't all be applied to the same shader.farda wrote:CG Profile: arbvp1, vs_2_x, arbfp1, ps_2_x
Also make sure you are using the correct keyword to define the profiles. CG uses "profiles" while directx uses "target" (don't know why ogre does that, it annoys me).
If you could post the material and shader here, we can have a look.
-
- Gnoblar
- Posts: 2
- Joined: Thu May 01, 2014 7:59 am
Re: CG Problem
Thanks for you answer, its not crashing, but everything that uses CG didnt render...
CG Profile is fine, vertex and pixel are aplied on two separate shaders..
first i thought its a problem with supporting profiles. but its not.
-Gpu program Terrain/Programs/VSDynLightingNM encountered an error during loading and is thus not supported.
-Gpu program Terrain/Programs/TerrainVP encountered an error during loading and is thus not supported.
-OGRE EXCEPTION(7:InternalErrorException): Cannot load GL vertex program Terrain/Programs/TerrainVP. Line 834:
I got these error in Ogre log while using GL Render System but i didnt get any such error while using DX...
i wonder even i didnt see loading these shaders on DX log! but its work on DX and not on GL
i uploaded all files that you want to check (logs, material and shaders) here
CG Profile is fine, vertex and pixel are aplied on two separate shaders..
first i thought its a problem with supporting profiles. but its not.
-Gpu program Terrain/Programs/VSDynLightingNM encountered an error during loading and is thus not supported.
-Gpu program Terrain/Programs/TerrainVP encountered an error during loading and is thus not supported.
-OGRE EXCEPTION(7:InternalErrorException): Cannot load GL vertex program Terrain/Programs/TerrainVP. Line 834:
I got these error in Ogre log while using GL Render System but i didnt get any such error while using DX...
i wonder even i didnt see loading these shaders on DX log! but its work on DX and not on GL
i uploaded all files that you want to check (logs, material and shaders) here
-
- Orc Shaman
- Posts: 788
- Joined: Mon Jan 18, 2010 6:06 pm
- Location: Costa Mesa, California
- x 24
Re: CG Problem
from this in your log - error C6007: Constant register limit exceeded; more than 96 constant registers needed to compiled program
Sounds like you need to check the profiles for every function that errors it's proper material file. I'm not an OpenGL guy but I'm pretty sure it means you need to compile with a higher level profile.
Sounds like you need to check the profiles for every function that errors it's proper material file. I'm not an OpenGL guy but I'm pretty sure it means you need to compile with a higher level profile.