星鸿阁

 找回密码
 立即注册
搜索
热搜: 活动 交友 动画
查看: 1317|回复: 0

使SRP着色器更易于编写

[复制链接]

2254

主题

2764

帖子

9644

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
9644
发表于 2021-5-8 14:56:51 | 显示全部楼层 |阅读模式
原文链接




Write out the bones of the shader (properties, etc)For each pass
  • Write out the pass header, includes, pragams and such
  • Write out macros and functions needed to abstract the differences between URP and standard, such as the WorldNormalVector function, or defining _WorldSpaceLightPos0 as _MainLightPosition
  • Write out my code and functions in surface shader format
  • Write out the URP code for the vertex/pixel functions
  • This code packs it’s data into the structs that I use and then calls my code

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|starfluidga

GMT+8, 2025-5-8 07:18 , Processed in 0.015420 second(s), 21 queries .

Made by Liga 星鸿阁

Copyright © 2020-2048, LigaStudio.

快速回复 返回顶部 返回列表