Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- d3d9:
- float4x4 mView : register(c0);
- float4x4 mProj : register(c4);
- float4x4 mInvView : register(c8);
- float3 cameraPos : register(c12);
- float4 timeVals : register(c13);
- float3 gAmbLightColor : register(c14);
- float3 gDirLightDir : register(c15);
- float3 gDirLightColor : register(c16);
- d3d11:
- cbuffer core_data : register(b0)
- {
- matrix mView;
- matrix mProj;
- matrix mInvView;
- float3 cameraPos;
- float4 timeVals;
- float3 gAmbLightColor;
- float3 gDirLightDir;
- float3 gDirLightColor;
- }
- gles2:
- mat4 mView;
- mat4 mProj;
- mat4 mInvView;
- vec3 cameraPos;
- vec4 timeVals;
- vec3 gAmbLightColor;
- vec3 gDirLightDir;
- vec3 gDirLightColor;
- gl4.2+ (3.1-4.2 without binding=0):
- layout(std140, binding = 0) uniform core_data
- {
- mat4 mView;
- mat4 mProj;
- mat4 mInvView;
- vec3 cameraPos;
- vec4 timeVals;
- vec3 gAmbLightColor;
- vec3 gDirLightDir;
- vec3 gDirLightColor;
- }
- macros: (ignore typenames, they can be re#defined)
- UNIFORM_BLOCK(core_data, 0)
- {
- UNIFORM_VAR(matrix mView, 0);
- UNIFORM_VAR(matrix mProj, 4);
- UNIFORM_VAR(matrix mInvView, 8);
- UNIFORM_VAR(float3 cameraPos, 12);
- UNIFORM_VAR(float4 timeVals, 13);
- UNIFORM_VAR(float3 gAmbLightColor, 14);
- UNIFORM_VAR(float3 gDirLightDir, 15);
- UNIFORM_VAR(float3 gDirLightColor, 16);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement