## [SOLVED] Missing FFPLib_AlphaTest.cg Topic is solved

Problems building or running the engine, queries about how to use features etc.
glennr
Greenskin
Posts: 118
Joined: Thu Jun 05, 2008 3:26 am
Location: Thames, New Zealand
x 3

### [SOLVED] Missing FFPLib_AlphaTest.cg

Ogre Version: :1.11:
Operating System: :Windows 10:
Render System: :D3D11:

I'm getting this error when RTSS is enabled with cg.

Code: Select all

14:19:51: Ogre::FileNotFoundException::FileNotFoundException: Cannot locate resource FFPLib_AlphaTest.cg in resource group OgreInternal. in ResourceGroupManager::openResource at path\to\ogre-1-11\ogremain\src\ogreresourcegroupmanager.cpp (line 706)
14:19:52: High-level program 'bb6759c26f24e83814f0c465ebee2fc2_FS' is not supported: Cannot locate resource FFPLib_AlphaTest.cg in resource group OgreInternal.
14:19:52: Ogre::InvalidParametersException::InvalidParametersException: Could not create gpu programs from render state  in ProgramManager::acquireGpuPrograms at path\to\ogre-1-11\components\rtshadersystem\src\ogreshaderprogrammanager.cpp (line 85)

The mentioned the generated shader file contains:

Code: Select all

#include "FFPLib_Common.cg"
#include "FFPLib_Texturing.cg"
#include "FFPLib_AlphaTest.cg"

I found the other FFPLib_*.cg files in the RTSahderLib in the samples media dir but FFPLib_AlphaTest is missing.
Last edited by glennr on Wed Mar 13, 2019 3:50 am, edited 1 time in total.
0 x

rpgplayerrobin
Gremlin
Posts: 151
Joined: Wed Mar 18, 2009 3:03 am
x 16

### Re: Missing FFPLib_AlphaTest.cg

I have never used RTSS, but could you not just make a copy of FFPLib_AlphaTest.hlsl and rename it to *.cg instead?

Also, since RTSS is generating shaders on the fly to glsl/hlsl/cg, isn't it just easier to target either glsl/hlsl directly instead of using cg (since cg targets one of those two anyway)?
0 x

glennr
Greenskin
Posts: 118
Joined: Thu Jun 05, 2008 3:26 am
Location: Thames, New Zealand
x 3

### Re: Missing FFPLib_AlphaTest.cg

rpgplayerrobin wrote:
Fri Mar 08, 2019 5:18 am
I have never used RTSS, but could you not just make a copy of FFPLib_AlphaTest.hlsl and rename it to *.cg instead?
There are no .hlsl files in the sample media. cg has a different syntax to hlsl so I don't think you can just replace one with the other.
Also, since RTSS is generating shaders on the fly to glsl/hlsl/cg, isn't it just easier to target either glsl/hlsl directly instead of using cg (since cg targets one of those two anyway)?
Cg is the default. So I thought it would be easier to stick with that. Also I want to target D3D11, so glsl is out, and there don't appear to be any hlsl files in the library, although the dir containing all the .cg files is named HLSL_Cg, but I'm not sure what that means. I did try setting the shader target language to 'hlsl' and it didn't work, can't remember the error and I'm not near my dev computer right now.
0 x

rpgplayerrobin
Gremlin
Posts: 151
Joined: Wed Mar 18, 2009 3:03 am
x 16

### Re: Missing FFPLib_AlphaTest.cg

That is strange. When I look through my directory of files I only see glsl/hlsl files regarding FFPLib_AlphaTest in these paths:

Also, can't you just rewrite it to CG syntax? It is a very, very small file and it should be easy to do.

If you really want support for D3D11, I don't think CG can help you get that working correctly. It is old and outdated, as far as I know it has no real support for D3D11/OpenGL3+ regarding its new features (like 3D textures, tesselation).
CG is a pain in the butt, if RTSS supports making shaders on the fly to glsl/hlsl instead, do it. Just look at my topic regarding just one bug regarding CG (and I have had plenty others): viewtopic.php?f=2&t=94854
0 x

paroj
OGRE Team Member
Posts: 836
Joined: Sun Mar 30, 2014 2:51 pm
x 147
Contact:

### Re: Missing FFPLib_AlphaTest.cg

0 x

glennr
Greenskin
Posts: 118
Joined: Thu Jun 05, 2008 3:26 am
Location: Thames, New Zealand
x 3

### Re: [SOLVED] Missing FFPLib_AlphaTest.cg

Thanks paroj, now I have D3D11 with RTSS working.
0 x