Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/intern/draw_shader_shared.h
| Show First 20 Lines • Show All 46 Lines • ▼ Show 20 Lines | |||||
| #define DRW_GRID_PER_VOLUME_MAX 16 | #define DRW_GRID_PER_VOLUME_MAX 16 | ||||
| /* Define the maximum number of attribute we allow in a curves UBO. | /* Define the maximum number of attribute we allow in a curves UBO. | ||||
| * This should be kept in sync with `GPU_ATTR_MAX` */ | * This should be kept in sync with `GPU_ATTR_MAX` */ | ||||
| #define DRW_ATTRIBUTE_PER_CURVES_MAX 15 | #define DRW_ATTRIBUTE_PER_CURVES_MAX 15 | ||||
| struct ViewInfos { | struct ViewInfos { | ||||
| /* View matrices */ | /* View matrices */ | ||||
| float4x4 persmat; | |||||
| float4x4 persinv; | |||||
| float4x4 viewmat; | float4x4 viewmat; | ||||
| float4x4 viewinv; | float4x4 viewinv; | ||||
| float4x4 winmat; | float4x4 winmat; | ||||
| float4x4 wininv; | float4x4 wininv; | ||||
| float4 clip_planes[6]; | float4 clip_planes[6]; | ||||
| float4 viewvecs[2]; | float4 viewvecs[2]; | ||||
| /* Should not be here. Not view dependent (only main view). */ | /* Should not be here. Not view dependent (only main view). */ | ||||
| Show All 16 Lines | struct ViewInfos { | ||||
| bool1 is_inverted; | bool1 is_inverted; | ||||
| int _pad0; | int _pad0; | ||||
| }; | }; | ||||
| BLI_STATIC_ASSERT_ALIGN(ViewInfos, 16) | BLI_STATIC_ASSERT_ALIGN(ViewInfos, 16) | ||||
| /* Do not override old definitions if the shader uses this header but not shader info. */ | /* Do not override old definitions if the shader uses this header but not shader info. */ | ||||
| #ifdef USE_GPU_SHADER_CREATE_INFO | #ifdef USE_GPU_SHADER_CREATE_INFO | ||||
| /* TODO(@fclem): Mass rename. */ | /* TODO(@fclem): Mass rename. */ | ||||
| # define ViewProjectionMatrix drw_view.persmat | |||||
| # define ViewProjectionMatrixInverse drw_view.persinv | |||||
| # define ViewMatrix drw_view.viewmat | # define ViewMatrix drw_view.viewmat | ||||
| # define ViewMatrixInverse drw_view.viewinv | # define ViewMatrixInverse drw_view.viewinv | ||||
| # define ProjectionMatrix drw_view.winmat | # define ProjectionMatrix drw_view.winmat | ||||
| # define ProjectionMatrixInverse drw_view.wininv | # define ProjectionMatrixInverse drw_view.wininv | ||||
| # define clipPlanes drw_view.clip_planes | # define clipPlanes drw_view.clip_planes | ||||
| # define ViewVecs drw_view.viewvecs | # define ViewVecs drw_view.viewvecs | ||||
| # define CameraTexCoFactors drw_view.viewcamtexcofac | # define CameraTexCoFactors drw_view.viewcamtexcofac | ||||
| #endif | #endif | ||||
| ▲ Show 20 Lines • Show All 217 Lines • Show Last 20 Lines | |||||