<!--
Copyright 2014 The Gfx-rs Developers.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
# Deferred Shading Example
This is an example of deferred shading with gfx-rs. It demonstrates the use of render targets and uniform buffers. It requires GL-3.2 to run.
Two render targets are created: a geometry buffer and a result buffer.
Rendering happens in two passes:
First, the terrain is rendered, writing position, normal and color to the geometry buffer.
Second, the lights are rendered as cubes. each fragment reads from the geometry buffer,
light is applied, and the result is written to the result buffer.
The result buffer is then displayed.
Press 1-4 to show the immediate buffers. Press 0 to show the final result.
## Screenshot
![Deferred Shading Example](screenshot.png)
## Useful libraries
- [glfw-rs](https://github.com/bjz/glfw-rs)
- [cgmath-rs](https://github.com/bjz/cgmath-rs)
- [noise-rs](https://github.com/bjz/noise-rs)
![avatar](https://profile-avatar.csdnimg.cn/default.jpg!1)
赵闪闪168
- 粉丝: 1728
- 资源: 6939
最新资源
- COMSOL激光熔覆热固流仿真教学视频:探究温度场与流场的结合应用,COMSOL激光熔覆热固流仿真:探究温度场与流场的交互作用教学视频分享,comsol激光熔覆 热固流仿真 温度场?流场,有教学视频
- 基于BP神经网络与声发射参数的试件损伤识别方法:可自定义多参数输入、多级应力水平识别的Matlab代码实践,基于BP神经网络算法与声发射参数的试件损伤识别MATLAB代码,自主设定多参数输入与应力水平
- Xgboost-Shap模型解释分析:可视化特征重要性,增强机器模型可解释性的分类与回归方法-基于自带数据集的研究,Xgboost-Shap模型解释分析:可视化特征重要性,提升机器模型可解释性的分类
- 基于Matlab的永磁同步电机SMO滑模观测器无传感器矢量控制算法仿真研究,永磁同步电机SMO滑模观测器无传感器矢量控制算法仿真研究-基于Matlab,永磁同步电机的SMO滑模观测器无传感器矢量控制
- 基于MATLAB Simulink仿真的风光柴储混合微电网储能电池系统互补能量管理研究,利用MATLAB Simulink 2018b及以上版本实现风光柴储混合微电网的储能电池系统互补能量管理仿真研究
- acp-Kotlin资源
- 表贴式永磁同步电机自抗扰控制模型研究:线性与非线性ESO在Matlab Simulink中的实现与文献参考,表贴式永磁同步电机自抗扰模型研究:一阶线性与非线性ADRC模型研究及其在MATLAB Sim
- AIOT人工智能物联网数据平台前端-AI人工智能资源
- 基于石墨烯材料特性的计算与COMSOL光子晶体超表面模拟研究,石墨烯材料计算与COMSOL光子晶体超表面模拟研究,石墨烯材料的计算 COMSOL光子晶体超表面模拟 ,核心关键词: 石墨烯材料计算; C
- wmproxy-Rust资源
- 金属银混合等离子体光子模式耦合形成的BICs及其在COMSOL超表面模拟中的研究,金属银混合等离子体光子模式耦合与超表面模拟研究BICs的探究,金属银混合等离子体光子模式耦合形成的BICs COMSO
- modelbox-硬件开发资源
- UMC-移动应用开发资源
- 基于连续域束缚态的铌酸锂二次谐波超表面模拟研究:COMSOL光子晶体模拟探索,基于连续域束缚态的铌酸锂二次谐波超表面模拟研究利用COMSOL光子晶体技术探究其性能表现,基于连续域束缚态(BICs)的铌
- 51单片机-单片机开发资源
- 112页!DeepSeek 7大场景+50大案例+全套提示词 从入门到精通干货-202502.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
![feedback](https://img-home.csdnimg.cn/images/20220527035711.png)
![feedback](https://img-home.csdnimg.cn/images/20220527035711.png)
![feedback-tip](https://img-home.csdnimg.cn/images/20220527035111.png)