📄 blur.nvv
字号:
/************************************************************************
Blur.nvv
This file implementes a simple vertex-shader to blur textures. It
first transforms the vertex position to clip-space and then replicates
texture coordinates to all four stages from v1 while adding an offset
from constant memory. The texture coordinate-offsets to use are selected
with the "Offset" constant from constant memory. Texture
coordinate-offsets are either set-up to be zero (no offset) or to enable
blur-filtering.
Copyright (C) 1999, 2000 NVIDIA Corporation
*************************************************************************/
#include "Constants.h"
vs.1.1
; Transform vertex position to clip space
dp4 oPos.x, v0, c[CV_WORLDVIEWPROJ_0]
dp4 oPos.y, v0, c[CV_WORLDVIEWPROJ_1]
dp4 oPos.z, v0, c[CV_WORLDVIEWPROJ_2]
dp4 oPos.w, v0, c[CV_WORLDVIEWPROJ_3]
mov a0.x, c[CV_UV_OFFSET_TO_USE].x
add oT0, v1, c[a0.x + CV_T0_BASE]
add oT1, v1, c[a0.x + CV_T1_BASE]
add oT2, v1, c[a0.x + CV_T2_BASE]
add oT3, v1, c[a0.x + CV_T3_BASE]
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -