[英]Rendering an Object more than once
Right now I'm facing the issue of rendering the same objects more than once in Directx 11, as the object has: 现在,我面临着在Directx 11中多次渲染相同对象的问题,因为对象具有:
Now the final color should be all of them somehow put together, maybe something like this: 现在,最终的颜色应该以某种方式将它们全部组合在一起,也许是这样的:
Final Color = (Diffuse + Texture) * Lighting // Not sure about this though 最终颜色=(漫反射+纹理)*光照//虽然不确定
But how can this be archieved? 但是,如何归档? Without the EFFECTS FRAMEWORK!
没有效果框架!
It can be achieved in DirectX11 a couple of ways. 它可以通过DirectX11中的两种方法来实现。 The first is by making an "uber shader".
首先是制作“超级着色器”。 This means to do diffuse, texture and lighting in the same shader.
这意味着要在同一着色器中进行漫反射,纹理和照明。 The second is to use dynamic shader linking and dynamically link together unique diffuse/texture/lighting shaders at runtime.
第二种是使用动态着色器链接,并在运行时将唯一的漫反射/纹理/照明着色器动态链接在一起。 The June 2010 sdk has a good example of dynamic shader linking.
2010年6月的SDK有一个很好的动态着色器链接示例。 Also the usual combination of colors is:
同样,通常的颜色组合是:
Final Color = Diffuse * Texture * Lighting 最终颜色=漫射*纹理*照明
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.