⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 simple_fp.cg

📁 delphi 最好的3D控件GLScene_Demos
💻 CG
字号:
//
// Simple Fragment Program
//
// - Just do a simple remap of RGBA
//
// Note: For OUT.color.a < 1 to work, you need
// to set the blending mode of the material
// that uses the shader to bmTransparency so
// that blending is switched on.

struct FragOut {
  float4 color : COLOR;
};

FragOut main(float4 color : COLOR)
{
  FragOut OUT;

  OUT.color.rg = color.gg;       // Red, Green channels <- Green value
  OUT.color.ba = float2(0.3, 1); // Blue <- 0.3; Alpha <- 1

  return OUT;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -