Creating VS_3_0 assembly

Problems building or running the engine, queries about how to use features etc.
Post Reply
Fighter19
Gnoblar
Posts: 6
Joined: Sat Jul 28, 2018 1:40 am
x 3

Creating VS_3_0 assembly

Post by Fighter19 »

Ogre Version: 1.11.1 :?:
Operating System: Windows 10 :?:
Render System: D3D11 :?:

Good evening.
I'm trying to create an assembly version of the CelShader provided in the example media.
For this I wanted to export the mapping like this (in the setup routine):

Code: Select all

	Ogre::GpuProgramPtr prog = Ogre::GpuProgramManager::getSingleton().getByName("Ogre/CelShadingVPhlsl");

	prog->getConstantDefinitions().save("C:\\Users\\Patrick\\Documents\\Ogre\\SceneLoadSample\\test.constants");
However as the file (and as the debugger states) the constant definitions are empty.
No crashes or anything like that.

Aren't they defined here?:

Code: Select all

vertex_program Ogre/CelShadingVPhlsl hlsl
{
	source Example_CelShading.hlsl
	entry_point main_vp
	target vs_4_0 vs_4_0_level_9_1 vs_4_0_level_9_3

	default_params
	{
		param_named_auto lightPosition light_position_object_space 0
		param_named_auto eyePosition camera_position_object_space
		param_named_auto worldViewProj worldviewproj_matrix
		param_named shininess float 10 
	}
}
Wouldn't that mean, that I have at least 4 uniforms (aka named constants)?

How can I create a mapping which tells which register corresponds to which parameter?

I hope my question is understandable and not completely stupid.

EDIT: I also tried calling createParameters() on the vertex program, before getting the ConstantDefinitions.
Post Reply