Advertisement
whiteflare

Untitled

Oct 6th, 2022
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.38 KB | None | 0 0
  1. I would like to see a GlobalShaderKeyword added that is only valid in VRChat.exe.
  2. VRChat.exe でのみ有効な GlobalShaderKeyword を追加してほしいです。
  3.  
  4. In open-beta-announcements for shader authors, there is an announcement that we have added a variable that can be used in shaders. I think that would be great!
  5. シェーダ作者向けの open-beta-announcements にて、シェーダ内で使用可能な変数を追加したとのアナウンスがありました。素晴らしいことだと思います!
  6.  
  7. On top of that, I would like to have the ability to switch my Unity shaders to work outside of VRChat.
  8. その上で、私の Unity シェーダが VRChat 以外でも動作するよう、スイッチする機能が欲しいです。
  9.  
  10. For example, a GlobalShaderKeyword in the form of something like this would allow my shaders to detect and properly handle behavior outside of VRChat.
  11. 例えばこのような形で GlobalShaderKeyword があれば、私のシェーダはVRChat 外での動作を検出し適切に処理することができます。
  12.  
  13. ```
  14. // in C#
  15. Shader.EnableKeyword("VRCHAT_ON"); // global keyword
  16. ```
  17. ```
  18. // in my shader code
  19. #pragma multi_compile VRCHAT_ON
  20. #ifdef VRCHAT_ON
  21. float _VRChatCameraMode;
  22. // other code for VRChat
  23. #endif
  24. ```
  25.  
  26. https://discord.com/channels/189511567539306508/503009489486872583/1027358043538735155
  27.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement