螢幕後處理 飽和度,亮度,對比度處理

2021-10-09 12:10:39 字數 1574 閱讀 9805

通過後處理技術,在渲染完成後,c#獲取得到相機所渲染的區域的影象,通過引數在shader中對其rgb值進一步進行顯式處理,將處理的結果再生成目標圖形,最後顯示出來。

shader "custom/britnesssiturationconstract"

_brightness

("_brightness"

, float)

=1.0

_saturation

("_saturation"

,float)=1

_contrast

("_contrast"

, float)=1

} subshader

;

;

fixed4 frag (v2f i)

: sv_target

;

endcg

}}fallback off

}

using system.collections;

using system.collections.generic;

using unityengine;

using unityengine.socialplatforms;

public

class

britnesssiturationconstract

:posteffectbasetest}[

range

(0.0f

,3.0f)]

public

float brightness =

1.0f;[

range

(0.0f

,3.0f)]

public

float saturation =

1.0f;[

range

(0.0f

,3.0f)]

public

float contrast =

1.0f

;void

onrenderimage

(rendertexture src,

rendertexture dest )

else

}}

HSL(色調,飽和度,亮度)

hsl hue hju 色調,saturation s t re n 飽和度,luminance lum n ns 亮度。hsl色彩模式是工業界的一種顏色標準,它通過對色調 h 飽和度 s 亮度 l 三個顏色通道的變化,以及它們相互之間的疊加來得到各式各樣的顏色的。它是目前運用最廣的顏色系統之一。h...

螢幕後處理

void onrenderimage rendertexture src,rendertexture dest 螢幕後處理函式 graphics.blit src,dest,mat,pass 螢幕後處理 src當前螢幕紋理 graphics.drawmesh amesh,vector3.zero,q...

PHP HSV色相 飽和度 亮度 增強

php hsv色相 飽和度 亮度 增強 在開始之前我們先了解一下什麼是hsv hsv 是顏色模型 色調h 用角度度量,取值範圍為0 360 從紅色開始按逆時針方向計算,紅色為0 綠色為120 藍色為240 它們的補色是 黃色為60 青色為180 品紅為300 飽和度s 飽和度s表示顏色接近光譜色的程...