ScreenPocket - 画面の隙間

Unityエンジニアの日々の雑記。たまにpython3、DirectX、PhotoshopScript(JavaScript)も触ります

シェーダでのプリプロセッサ

そういえばcgのプリプロセッサは何が使えるんだろうかと思って調べてみたけど、


Cg_language

ここ見ると、

Preprocessor

Cg profiles must support the full ANSI C standard preprocessor capabilities: #if, #define, and so on. However, while #include must be supported the mechanism by which the file to be included is located is implementation defined.

との事。大体Cと一緒って感じかな?

加えてこっちのマクロもあるのを忘れずに。


Unity - Unity Manual

久々に統合ヘッダを作ろうかしら。。