Home › Forums › Games202-高质量实时渲染 › [作业1] 移动物体阴影叠加解决办法 Tagged: tips This topic has 2 replies, 3 voices, and was last updated 1 year, 7 months ago by coli. Viewing 2 reply threads Author Posts 2021年4月6日 at 上午11:09 #8052 Score: 1 DanParticipant Karma: 2 pts 在实现移动物体阴影的时候,可能会遇到阴影叠加的情况。这是因为 shadowmap 在每帧渲染的时候并没有被清除,新的深度值会被叠加地写到 shadowmap 上。建议在 WebGLRenderer.js 中的 render 函数内,每一个光源的循环开始处加入如下代码,清除 shadowmap 上的数据: gl.bindFramebuffer(gl.FRAMEBUFFER, this.lights[l].entity.fbo); gl.clear(gl.DEPTH_BUFFER_BIT); This post has received 1 vote up. This topic was modified 1 year, 11 months ago by Dan. Attachments:You must be logged in to view attached files. 2021年4月9日 at 上午1:01 #8084 Score: 0 Zhixiong RenParticipant 非常感谢! 2021年8月31日 at 下午7:45 #9232 Score: 0 coliParticipant js白痴请教下如何让模型移动 Author Posts Viewing 2 reply threads You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In