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

📄 update_position_only_by_vel.cg

📁 游戏编程精粹6第中关于粒子的实时流体仿真系统,对入门的游戏开发者很有帮助.
💻 CG
字号:
#include "sph.cg"

void main(fixed index : TEXCOORD0,
		  uniform samplerRECT attr_rect : TEXUNIT0,
		  uniform float timestep,
		  out float3 result : COLOR)
{
	float3 pos = f3texRECT(attr_rect, half2(index, GPU_ATTR_POS));
	float3 vel = f3texRECT(attr_rect, half2(index, GPU_ATTR_VEL));

	result = pos + timestep*vel;
}

⌨️ 快捷键说明

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