Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
403 views
in Technique[技术] by (71.8m points)

opengl - 如何将阴影贴图转换为纹理贴图(how to transform shadow map to texture map)

after i apply shadow map on rendering object, i want to make another depth map using shadow map but i dont know the method giving data to 2nd floor as depth map

(在将阴影贴图应用于渲染对象之后,我想使用阴影贴图制作另一个深度图,但我不知道将数据作为深度贴图提供给第二层的方法)

im trying to coding in main cpp and have 2question

(我正在尝试在主要cpp中编码并有2question)

after made 1,2 pass what i have to do?

(取得1,2通过后我该怎么办?)

void RenderDepthMap(glm::mat4 projectionMatrix, glm::mat4 viewMatrix) //depth map confirming shadow map
{

    // how to give model, view, projrction data to vertex shader?

    // how to give rendering data to fragment shader?

    glm::mat4 model = glm::mat4{ 1.0f }; //2nd floor tranlate
    model = glm::translate(model, glm::vec3(25.0f, -2.0f, 0.0f));
    model = glm::rotate(model, 180* toRadian, glm::vec3(0.0f, 1.0f, 0.0f));
    glUniformMatrix4fv(uniformModel, 1, GL_FALSE, glm::value_ptr(model));
    meshList[3]->RenderMesh();
}
  ask by RkaTi translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...