当前位置:网站首页>Unity shader learning 004 shader debugging platform difference third-party debugging tools
Unity shader learning 004 shader debugging platform difference third-party debugging tools
2022-06-13 03:57:00 【Dutch pig small ash】
List of articles
Learning time :
2022.5.27
Learning output :
1. debugging Shader
1.1 We turn on FrameDebug window
Frame Debugger Let's observe the rendering process of a frame separately , Observe every DrawCall The rendering of , It will bring DrawCall One by one in order , By clicking on each DrawCall, You can see the execution to this DrawCall Rendering when , Step by step, you can see the whole scene rendering and the very detailed construction process .

1.2 adopt FrameDebug Window view us shader Render the state of the target
For example, here is a forward rendering Cube
1. First Shader yes Unlit/004,SubShader #0 Because of our shader There is only one render channel
SubShader Is a sub shader of the entire shader , When one Mesh( grid ) When it needs to be drawn ,Unity Will be in Shader Find a way to render it , And from Shader Choose the first one that can be fully supported SubShader To achieve . To make the material , Or let the game screen play its best effect on different platforms , We can define more than one SubShader. every last SubShader All contain complete rendering parameters , Render settings , Rendering methods, etc . In the beginning stage , We write a for materials SubShader that will do , We can leave the rest of the work to the powerful FallBack To complete .
2. Then our passage Pass yes #0
3.ZClip Set up GPU Depth clip mode
4.ZTest Deep inspection LessEqual Less than the target
LEqual Draw geometry in front of or at the same distance from existing geometry . Do not draw geometry behind existing geometry .
5.ZWrite: Depth write , When enabled, determines whether the depth value of the slice is written to the depth buffer , Configurable
2. Platform differences
2.1 Anti-Aliasing
Because of us Unity It's cross platform , So there is OpenGL and DirectX Two coordinate systems
Usually ,Unity It will help us turn over automatically
however , If anti aliasing is turned on , that DX platform , You need to manually flip
Unity In this way, anti aliasing is turned on (Anti Aliasing)
The method of manual turnover , Is to first judge whether it is DX platform , Then determine whether anti aliasing is enabled , If all is satisfied , Then flip
[ Failed to transfer the external chain picture , The origin station may have anti-theft chain mechanism , It is suggested to save the pictures and upload them directly (img-YzkCKEBZ-1655041487014)(https://liuwenxin-oss.oss-cn-hangzhou.aliyuncs.com/img/4cbba614e4f348858f2809c17e776dc0.png)]
Pictured ,Unity yes DX platform
2.2 DX The platform defines variables more strictly
3. Third party debugging tools
边栏推荐
- 单片机:A/D 差分输入信号
- 【测试开发】自动化测试selenium(二)——webdriver常用的API
- On the value of line height
- 单片机:RS485 通信与 Modbus 协议
- [MySQL] index and transaction
- Single chip microcomputer: infrared remote control communication principle
- Meaning of different values of margin and padding
- 谈谈激光雷达的波长
- MSG messages in ROS
- [test development] file compression project practice
猜你喜欢
[multithreading] what is multithreading in the end -- the elementary level of multithreading (review for self use)
Lightweight digital mall system based on PHP
【測試開發】自動化測試selenium(三)——unittest框架解析
[MySQL] index and transaction
干预分析 + 伪回归
Real time requirements for 5g China Unicom repeater network management protocol
SCM signal generator program
【测试开发】自动化测试selenium(二)——webdriver常用的API
Unity Shader 学习 004-Shader 调试 平台差异性 第三方调试工具
单片机:A/D(模数转换)的主要指标
随机推荐
Interpretation of mobile phone private charging protocol
单片机:NEC 协议红外遥控器
单片机:D/A 输出
Example of try catch finally execution sequence
【测试开发】自动化测试selenium(二)——webdriver常用的API
Ego planner code analysis ----cmakelists Txt and package xml
MCU: RS485 communication and Modbus Protocol
【多线程】多线程到底是个甚——多线程初阶(复习自用)
Single chip microcomputer: d/a output
footstep
[Yugong series] June 2022 Net architecture class 080 master cluster and database switching of distributed middleware schedulemaster
UnionPay commerce - merchant statistics service platform
谈谈激光雷达的波长
单片机:PCF8591 应用程序
Lambda end operation reduce merge
SCM signal generator program
EGO planner论文翻译
Lightweight digital mall system based on PHP
单片机:EEPROM介绍与操作
Installing MySQL 8.0.20 under Linux and ubuntu20.04 LTS