当不设置modelMatrix移动位置的时候,是对的,modelMatrix的值肯定不会错,因为我验证过
貌似还需要修改 VertexShader,但PostProcessStage 只有fragmentShader,没有地方可写VertexShader
楼主您好,方便的话,能否说下 在配合postprocessing处理下,这个的思路呀?我知道应该是修改 阴影的receive的颜色,但是具体到PostProcessStage的fragmentShader该怎么写呢?下面拷贝glsl会报错的 uniform sampler2D shadowMap_texture; uniform mat4 shadowMap_matrix; uniform vec3 shadowMap_lightDirectionEC; uniform vec4 shadowMap_lightPositionEC; uniform vec4 shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness; uniform vec4 shadowMap_texelSizeDepthBiasAndNormalShadingSmooth;
varying vec3 v_logPositionEC;
vec4 getPositionEC() {
return vec4(v_positionEC, 1.0);
} vec3 getNormalEC() {
return normalize(v_normalEC);
}