This repository has been archived on 2023-10-09. You can view files and clone it, but cannot push or open issues or pull requests.
Files
blender-archive/source/blender/gpu/shaders/gpu_shader_common_obinfos_lib.glsl
Clément Foucault c476c36e40 Workbench Simplification Refactor
This patch is (almost) a complete rewrite of workbench engine.
The features remain unchanged but the code quality is greatly improved.
Hair shading is brighter but also more correct.

This also introduce the concept of `DRWShaderLibrary` to make a simple
include system inside the GLSL files.

Differential Revision: https://developer.blender.org/D7060
2020-03-11 17:12:16 +01:00

21 lines
501 B
GLSL

#pragma BLENDER_REQUIRE(common_view_lib.glsl)
#ifndef GPU_OBINFOS_UBO
# define GPU_OBINFOS_UBO
struct ObjectInfos {
vec4 drw_OrcoTexCoFactors[2];
vec4 drw_ObjectColor;
vec4 drw_Infos;
};
layout(std140) uniform infoBlock
{
/* DRW_RESOURCE_CHUNK_LEN = 512 */
ObjectInfos drw_infos[512];
};
# define OrcoTexCoFactors (drw_infos[resource_id].drw_OrcoTexCoFactors)
# define ObjectInfo (drw_infos[resource_id].drw_Infos)
# define ObjectColor (drw_infos[resource_id].drw_ObjectColor)
#endif