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

📄 adjustcontrast.psh

📁 real-time(实时渲染技术DirectX)Media
💻 PSH
字号:
ps.1.4

;Used to rebias the results
def c1, 0.5, 0.5, 0.5, 1.0

;Load the texture
texld r0, t0

;Pull colors back to the center
add_sat r1,  r0_bx2, c0
add_sat r2, -r0_bx2, c0

;choose the correct value based on the side and scale
cnd_d2 r3, r0, r1, -r2

;bias the value back
add    r3, r3, c1

phase

;Handle the case of increasing contrast
;Push values from the center
add r1.rgb, r0, c0
sub r2.rgb, r0, c0

;choose value based on original value
cnd r1.rgb, r0, r1, r2

;Choose new values based on the sign of the 
;input adjustor
cmp r0.rgb, c0, r1, r3
+mov r0.a, c0.a

⌨️ 快捷键说明

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