bgfx/examples/39-assao/uniforms.sh

43 lines
1.9 KiB
Bash
Raw Normal View History

2018-12-15 00:09:37 +03:00
uniform vec4 u_params[19];
uniform vec4 u_rect;
#define u_viewportPixelSize u_params[0].xy
#define u_halfViewportPixelSize u_params[0].zw
#define u_depthUnpackConsts u_params[1].xy
#define u_ndcToViewMul u_params[2].xy
#define u_ndcToViewAdd u_params[2].zw
#define u_perPassFullResCoordOffset u_params[3].xy
#define u_perPassFullResUVOffset u_params[3].zw
#define u_viewport2xPixelSize u_params[4].xy
#define u_viewport2xPixelSize_x_025 u_params[4].zw
#define u_effectRadius u_params[5].x
#define u_effectShadowStrength u_params[5].y
#define u_effectShadowPow u_params[5].z
#define u_effectShadowClamp u_params[5].w
#define u_effectFadeOutMul u_params[6].x
#define u_effectFadeOutAdd u_params[6].y
#define u_effectHorizonAngleThreshold u_params[6].z
#define u_effectSamplingRadiusNearLimitRec u_params[6].w
#define u_depthPrecisionOffsetMod u_params[7].x
#define u_negRecEffectRadius u_params[7].y
#define u_loadCounterAvgDiv u_params[7].z
#define u_adaptiveSampleCountLimit u_params[7].w
#define u_invSharpness u_params[8].x
#define u_passIndex u_params[8].y
#define u_quarterResPixelSize u_params[8].zw
#define u_patternRotScaleMatrices(i) u_params[9+(i)]
#define u_normalsUnpackMul u_params[14].x
#define u_normalsUnpackAdd u_params[14].y
#define u_detailAOStrength u_params[14].z
#define u_layer u_params[14].w
#define u_normalsWorldToViewspaceMatrix0 u_params[15]
#define u_normalsWorldToViewspaceMatrix1 u_params[16]
#define u_normalsWorldToViewspaceMatrix2 u_params[17]
#define u_normalsWorldToViewspaceMatrix3 u_params[18]
#define SSAO_MAX_TAPS 32
#define SSAO_ADAPTIVE_TAP_BASE_COUNT 5
#define SSAO_ADAPTIVE_TAP_FLEXIBLE_COUNT (SSAO_MAX_TAPS-SSAO_ADAPTIVE_TAP_BASE_COUNT)
#define SSAO_DEPTH_MIP_LEVELS 4
#define SSAO_ENABLE_NORMAL_WORLD_TO_VIEW_CONVERSION 1