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

📄 copy_dup_density.cg.bak

📁 游戏编程精粹6第中关于粒子的实时流体仿真系统,对入门的游戏开发者很有帮助.
💻 BAK
字号:
void main(float2 sn_coord : TEXCOORD0,
		  /**	
		  y  : subject particle index
		  xy : neighbour particle index
		  **/
		  uniform samplerRECT density_rect   : TEXUNIT0,
		  uniform samplerRECT neighbour_rect : TEXUNIT1,
		  out float result : COLOR
		  )
{
	float neighbour_index = f1texRECT(neighbour_rect, sn_coord.yx);
	result = f1texRECT(density_rect, unpack_2ushort(neighbour_index)*65536);

	//result = 44;
	//result = neighbour_index;
	//result.xy = (unpack_2ushort(neighbour_index)*65536);
}

⌨️ 快捷键说明

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