add fix kinect demo

This commit is contained in:
Chikashi Miyama 2019-10-04 21:52:26 +02:00
parent 0dac7a812d
commit 6fb1a1fcac
4 changed files with 165 additions and 406 deletions

View file

@ -139,8 +139,8 @@ MonoBehaviour:
serializedVersion: 2
x: 374
y: -190
width: 718
height: 1964
width: 710
height: 1944
--- !u!114 &114350483966674976
MonoBehaviour:
m_ObjectHideFlags: 1
@ -639,9 +639,8 @@ VisualEffectResource:
1\n#define VFX_USE_SEED_CURRENT 1\n#define VFX_USE_LIFETIME_CURRENT 1\n#define
VFX_USE_ANGLEZ_CURRENT 1\n#define VFX_USE_TEXINDEX_CURRENT 1\n#define VFX_USE_POSITION_CURRENT
1\n#define VFX_USE_ALIVE_CURRENT 1\n#define VFX_USE_AGE_CURRENT 1\n#define VFX_LOCAL_SPACE
1\n#include \"Packages/com.unity.visualeffectgraph/Shaders/RenderPipeline/HDRP/VFXDefines.hlsl\"\n\n\nCBUFFER_START(parameters)\n
\ float3 A_a;\n float A_b;\n float3 B_a;\n float B_b;\n float
A_c;\n float B_c;\n uint2 PADDING_0;\nCBUFFER_END\n\n\n#include \"Packages/com.unity.visualeffectgraph/Shaders/Common/VFXCommonCompute.cginc\"\n#include
1\n#include \"Packages/com.unity.visualeffectgraph/Shaders/RenderPipeline/HDRP/VFXDefines.hlsl\"\n\n\n\n#include
\"Packages/com.unity.visualeffectgraph/Shaders/Common/VFXCommonCompute.cginc\"\n#include
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.cginc\"\n\n\n\nRWByteAddressBuffer
attributeBuffer;\nByteAddressBuffer sourceAttributeBuffer;\n\nCBUFFER_START(initParams)\n#if
!VFX_USE_SPAWNER_FROM_GPU\n uint nbSpawned;\t\t\t\t\t// Numbers of particle
@ -682,26 +681,28 @@ VisualEffectResource:
position = float3(0,0,0);\n bool alive = (bool)true;\n float age
= (float)0;\n \n\n#if VFX_USE_PARTICLEID_CURRENT\n particleId
= particleIndex;\n#endif\n#if VFX_USE_SEED_CURRENT\n seed = WangHash(particleIndex
^ systemSeed);\n#endif\n \n SetAttribute_E6295C0( /*inout */velocity,
\ /*inout */seed, A_a, B_a);\n SetAttribute_F01429A3( /*inout */lifetime,
\ /*inout */seed, A_b, B_b);\n SetAttribute_48A7BD6E( /*inout */angleZ,
\ /*inout */seed, A_c, B_c);\n \n\n\n#if VFX_USE_ALIVE_CURRENT\n if
(alive)\n {\n\t\t\tuint deadIndex = deadListIn.DecrementCounter();\n
\ uint index = deadListIn[deadIndex];\n attributeBuffer.Store3((index
* 0x4 + 0x0) << 2,asuint(velocity));\n attributeBuffer.Store((index
* 0x1 + 0x100) << 2,asuint(lifetime));\n attributeBuffer.Store((index
* 0x1 + 0x140) << 2,asuint(angleZ));\n attributeBuffer.Store((index
* 0x3 + 0x180) << 2,asuint(texIndex));\n attributeBuffer.Store3((index
* 0x4 + 0x240) << 2,asuint(position));\n attributeBuffer.Store((index
* 0x3 + 0x181) << 2,uint(alive));\n attributeBuffer.Store((index
* 0x3 + 0x182) << 2,asuint(age));\n \n\n }\n#else\n uint
index = particleIndex;\n attributeBuffer.Store3((index * 0x4 + 0x0) <<
2,asuint(velocity));\n attributeBuffer.Store((index * 0x1 + 0x100) <<
2,asuint(lifetime));\n attributeBuffer.Store((index * 0x1 + 0x140) <<
2,asuint(angleZ));\n attributeBuffer.Store((index * 0x3 + 0x180) << 2,asuint(texIndex));\n
\ attributeBuffer.Store3((index * 0x4 + 0x240) << 2,asuint(position));\n
\ attributeBuffer.Store((index * 0x3 + 0x181) << 2,uint(alive));\n attributeBuffer.Store((index
* 0x3 + 0x182) << 2,asuint(age));\n \n\n#endif\n }\n}\n"
^ systemSeed);\n#endif\n \n {\n SetAttribute_E6295C0(
/*inout */velocity, /*inout */seed, float3(-0.333,0.8,-0.333), float3(0.333,1,0.333));\n
\ }\n {\n SetAttribute_F01429A3( /*inout */lifetime,
\ /*inout */seed, (float)6, (float)12);\n }\n {\n SetAttribute_48A7BD6E(
/*inout */angleZ, /*inout */seed, (float)0, (float)360);\n }\n \n\n\n#if
VFX_USE_ALIVE_CURRENT\n if (alive)\n {\n\t\t\tuint deadIndex =
deadListIn.DecrementCounter();\n uint index = deadListIn[deadIndex];\n
\ attributeBuffer.Store3((index * 0x4 + 0x0) << 2,asuint(velocity));\n
\ attributeBuffer.Store((index * 0x1 + 0x100) << 2,asuint(lifetime));\n
\ attributeBuffer.Store((index * 0x1 + 0x140) << 2,asuint(angleZ));\n
\ attributeBuffer.Store((index * 0x3 + 0x180) << 2,asuint(texIndex));\n
\ attributeBuffer.Store3((index * 0x4 + 0x240) << 2,asuint(position));\n
\ attributeBuffer.Store((index * 0x3 + 0x181) << 2,uint(alive));\n
\ attributeBuffer.Store((index * 0x3 + 0x182) << 2,asuint(age));\n
\ \n\n }\n#else\n uint index = particleIndex;\n attributeBuffer.Store3((index
* 0x4 + 0x0) << 2,asuint(velocity));\n attributeBuffer.Store((index *
0x1 + 0x100) << 2,asuint(lifetime));\n attributeBuffer.Store((index *
0x1 + 0x140) << 2,asuint(angleZ));\n attributeBuffer.Store((index * 0x3
+ 0x180) << 2,asuint(texIndex));\n attributeBuffer.Store3((index * 0x4
+ 0x240) << 2,asuint(position));\n attributeBuffer.Store((index * 0x3
+ 0x181) << 2,uint(alive));\n attributeBuffer.Store((index * 0x3 + 0x182)
<< 2,asuint(age));\n \n\n#endif\n }\n}\n"
- compute: 1
name: '[System 1]Update'
source: "#pragma kernel CSMain\n#define NB_THREADS_PER_GROUP 64\n#define VFX_USE_VELOCITY_CURRENT
@ -710,8 +711,7 @@ VisualEffectResource:
1\n#define VFX_USE_SCALEY_CURRENT 1\n#define VFX_USE_POSITION_CURRENT 1\n#define
VFX_USE_ALIVE_CURRENT 1\n#define VFX_USE_AGE_CURRENT 1\n#define VFX_HAS_INDIRECT_DRAW
1\n#define VFX_LOCAL_SPACE 1\n#include \"Packages/com.unity.visualeffectgraph/Shaders/RenderPipeline/HDRP/VFXDefines.hlsl\"\n\n\nCBUFFER_START(parameters)\n
\ float3 Velocity_b;\n float FrameRate_a;\n float deltaTime_a;\n float
Drag_b;\n float dragCoefficient_c;\n uint PADDING_0;\nCBUFFER_END\n\n\n#include
\ float FrameRate_a;\n float deltaTime_a;\n uint2 PADDING_0;\nCBUFFER_END\n\n\n#include
\"Packages/com.unity.visualeffectgraph/Shaders/Common/VFXCommonCompute.cginc\"\n#include
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.cginc\"\n\n\n\nRWByteAddressBuffer
attributeBuffer;\n\n#if VFX_USE_ALIVE_CURRENT\nRWStructuredBuffer<uint> deadListOut;\n#endif\n\n#if
@ -742,10 +742,10 @@ VisualEffectResource:
* 0x4 + 0x240) << 2));\n\t\t\tfloat age = asfloat(attributeBuffer.Load((index
* 0x3 + 0x182) << 2));\n\t\t\t\n\n\t\t\t\n#if VFX_USE_OLDPOSITION_CURRENT\n\t\t\toldPosition
= position;\n#endif\n\t\t\t\n\t\t\tFlipbookPlay_0( /*inout */texIndex, FrameRate_a,
deltaTime_a);\n\t\t\tForce_1( /*inout */velocity, mass, Velocity_b, Drag_b,
deltaTime_a);\n\t\t\tDrag_1( /*inout */velocity, mass, size, scaleX, scaleY,
dragCoefficient_c, deltaTime_a);\n\t\t\tEulerIntegration( /*inout */position,
velocity, deltaTime_a);\n\t\t\tAge( /*inout */age, deltaTime_a);\n\t\t\tReap(age,
deltaTime_a);\n\t\t\t{\n\t\t\t Force_1( /*inout */velocity, mass, float3(-0.2,0.8,0),
(float)1, deltaTime_a);\n\t\t\t}\n\t\t\t{\n\t\t\t Drag_1( /*inout */velocity,
mass, size, scaleX, scaleY, (float)0.1, deltaTime_a);\n\t\t\t}\n\t\t\tEulerIntegration(
/*inout */position, velocity, deltaTime_a);\n\t\t\tAge( /*inout */age, deltaTime_a);\n\t\t\tReap(age,
lifetime, /*inout */alive);\n\t\t\t\n\n\t\t\tif (alive)\n\t\t\t{\n\t\t\t\tattributeBuffer.Store3((index
* 0x4 + 0x0) << 2,asuint(velocity));\n\t\t\t\tattributeBuffer.Store((index *
0x3 + 0x180) << 2,asuint(texIndex));\n\t\t\t\tattributeBuffer.Store3((index
@ -763,8 +763,9 @@ VisualEffectResource:
+ 0x181) << 2));\n\t\tfloat age = asfloat(attributeBuffer.Load((index * 0x3
+ 0x182) << 2));\n\t\t\n\n\t\t\n#if VFX_USE_OLDPOSITION_CURRENT\n\t\toldPosition
= position;\n#endif\n\t\t\n\t\tFlipbookPlay_0( /*inout */texIndex, FrameRate_a,
deltaTime_a);\n\t\tForce_1( /*inout */velocity, mass, Velocity_b, Drag_b, deltaTime_a);\n\t\tDrag_1(
/*inout */velocity, mass, size, scaleX, scaleY, dragCoefficient_c, deltaTime_a);\n\t\tEulerIntegration(
deltaTime_a);\n\t\t{\n\t\t Force_1( /*inout */velocity, mass, float3(-0.2,0.8,0),
(float)1, deltaTime_a);\n\t\t}\n\t\t{\n\t\t Drag_1( /*inout */velocity, mass,
size, scaleX, scaleY, (float)0.1, deltaTime_a);\n\t\t}\n\t\tEulerIntegration(
/*inout */position, velocity, deltaTime_a);\n\t\tAge( /*inout */age, deltaTime_a);\n\t\tReap(age,
lifetime, /*inout */alive);\n\t\t\n\n\t\tattributeBuffer.Store3((index * 0x4
+ 0x0) << 2,asuint(velocity));\n\t\tattributeBuffer.Store((index * 0x3 + 0x180)
@ -797,15 +798,12 @@ VisualEffectResource:
1\n\t\t#define HDRP_USE_BASE_COLOR_MAP_ALPHA 1\n\t\t#define USE_NORMAL_MAP 1\n\t\t#define
HDRP_USE_BASE_COLOR 1\n\t\t#define VFX_PRIMITIVE_QUAD 1\n\t\t\n\t\t\n\t\t\n\t\t#define
VFX_LOCAL_SPACE 1\n\t\t#include \"Packages/com.unity.visualeffectgraph/Shaders/RenderPipeline/HDRP/VFXDefines.hlsl\"\n\t\t\n\n\t\tCBUFFER_START(parameters)\n\t\t
\ float4 Size_a;\n\t\t float2 flipBookSize;\n\t\t float2 invFlipBookSize;\n\t\t
\ float Size_b;\n\t\t float Color_d;\n\t\t float invSoftParticlesFadeDistance;\n\t\t
\ float smoothness;\n\t\t float thickness;\n\t\t float normalScale;\n\t\t
\ uint2 PADDING_0;\n\t\tCBUFFER_END\n\t\tTexture2D baseColorMap;\n\t\tSamplerState
samplerbaseColorMap;\n\t\tTexture2D normalMap;\n\t\tSamplerState samplernormalMap;\n\t\t\n\n\t\t\n\t\t#define
VFX_NEEDS_COLOR_INTERPOLATOR (VFX_USE_COLOR_CURRENT || VFX_USE_ALPHA_CURRENT)\n\t\t\n\t\tByteAddressBuffer
attributeBuffer;\t\n\t\t\n\t\t#if VFX_HAS_INDIRECT_DRAW\n\t\tStructuredBuffer<uint>
indirectBuffer;\t\n\t\t#endif\t\n\t\t\n\t\t#if USE_DEAD_LIST_COUNT\n\t\tByteAddressBuffer
deadListCount;\n\t\t#endif\n\t\t\n\t\tCBUFFER_START(outputParams)\n\t\t\tfloat
\ float4 Size_a;\n\t\t float Color_d;\n\t\t uint3 PADDING_0;\n\t\tCBUFFER_END\n\t\tTexture2D
baseColorMap;\n\t\tSamplerState samplerbaseColorMap;\n\t\tTexture2D normalMap;\n\t\tSamplerState
samplernormalMap;\n\t\t\n\n\t\t\n\t\t#define VFX_NEEDS_COLOR_INTERPOLATOR (VFX_USE_COLOR_CURRENT
|| VFX_USE_ALPHA_CURRENT)\n\t\t\n\t\tByteAddressBuffer attributeBuffer;\t\n\t\t\n\t\t#if
VFX_HAS_INDIRECT_DRAW\n\t\tStructuredBuffer<uint> indirectBuffer;\t\n\t\t#endif\t\n\t\t\n\t\t#if
USE_DEAD_LIST_COUNT\n\t\tByteAddressBuffer deadListCount;\n\t\t#endif\n\t\t\n\t\tCBUFFER_START(outputParams)\n\t\t\tfloat
nbMax;\n\t\t\tfloat systemSeed;\n\t\tCBUFFER_END\n\t\t\n\t\tENDHLSL\n\t\t\n\n\t\t\n\t\t\n\t\t//
Forward pass\n\t\tPass\n\t\t{\t\t\n\t\t\tTags { \"LightMode\"=\"Forward\"}\n\t\t\t\t\t\n\t\t\tHLSLPROGRAM\n\t\t\t#pragma
target 4.5\n\t\t\t\n\t\t\t#define UNITY_MATERIAL_LIT\n\t\t\t#define LIGHTLOOP_TILE_PASS\n\t\t\t#define
@ -916,11 +914,11 @@ VisualEffectResource:
pivotX = (float)0;\n\t\t\t\t\t\tfloat pivotY = (float)0;\n\t\t\t\t\t\tfloat
pivotZ = (float)0;\n\t\t\t\t\t\tfloat scaleZ = (float)1;\n\t\t\t\t\t\tfloat
age = asfloat(attributeBuffer.Load((index * 0x3 + 0x182) << 2));\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\n\t\t\t\tAttributeFromCurve_45ABB909(
/*inout */size, age, lifetime, Size_a);\n\t\t\t\tSetAttribute_39EE3455( /*inout
*/size, Size_b);\n\t\t\t\tOrient_1( /*inout */axisX, /*inout */axisY, /*inout
*/axisZ, position);\n\t\t\t\tAttributeFromCurve_48A86161( /*inout */color, /*inout
*/alpha, age, lifetime, Color_d);\n\t\t\t\t\n\n\t\t\t\t\n\t\t\t\tif (!alive)\n\t\t\t\t\treturn
o;\n\t\t\t\t\n\t\t\t#if VFX_PRIMITIVE_QUAD\n\t\t\t\n\t\t\t\to.VFX_VARYING_UV.x
/*inout */size, age, lifetime, Size_a);\n\t\t\t\t{\n\t\t\t\t SetAttribute_39EE3455(
/*inout */size, (float)2);\n\t\t\t\t}\n\t\t\t\tOrient_1( /*inout */axisX, /*inout
*/axisY, /*inout */axisZ, position);\n\t\t\t\tAttributeFromCurve_48A86161(
/*inout */color, /*inout */alpha, age, lifetime, Color_d);\n\t\t\t\t\n\n\t\t\t\t\n\t\t\t\tif
(!alive)\n\t\t\t\t\treturn o;\n\t\t\t\t\n\t\t\t#if VFX_PRIMITIVE_QUAD\n\t\t\t\n\t\t\t\to.VFX_VARYING_UV.x
= float(id & 1);\n\t\t\t\to.VFX_VARYING_UV.y = float((id & 2) >> 1);\n\t\t\t\tconst
float2 vOffsets = o.VFX_VARYING_UV.xy - 0.5f;\n\t\t\t\t\n\t\t\t#elif VFX_PRIMITIVE_TRIANGLE\n\t\t\t\n\t\t\t\tconst
float2 kOffsets[] = {\n\t\t\t\t\tfloat2(-0.5f, \t-0.288675129413604736328125f),\n\t\t\t\t\tfloat2(0.0f,
@ -949,27 +947,36 @@ VisualEffectResource:
\n\t\t\t\t\t\to.VFX_VARYING_ALPHA = alpha;\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\n\t\t\t\t\t\t#ifdef
VFX_VARYING_EXPOSUREWEIGHT\n\t\t\t\t\t\t\n\t\t\t\t\t\to.VFX_VARYING_EXPOSUREWEIGHT
= exposureWeight;\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\n\t\t\t\t\t\t#if USE_SOFT_PARTICLE
&& defined(VFX_VARYING_INVSOFTPARTICLEFADEDISTANCE)\n\t\t\t\t\t\t\n\t\t\t\t\t\to.VFX_VARYING_INVSOFTPARTICLEFADEDISTANCE
&& defined(VFX_VARYING_INVSOFTPARTICLEFADEDISTANCE)\n\t\t\t\t\t\tfloat invSoftParticlesFadeDistance
= (float)0;\n\t\t\t\t\t\t{\n\t\t\t\t\t\t \n\t\t\t\t\t\t invSoftParticlesFadeDistance
= (float)1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\to.VFX_VARYING_INVSOFTPARTICLEFADEDISTANCE
= invSoftParticlesFadeDistance;\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\n\t\t\t\t\t\t#if
USE_ALPHA_TEST && defined(VFX_VARYING_ALPHATHRESHOLD)\n\t\t\t\t\t\t\n\t\t\t\t\t\to.VFX_VARYING_ALPHATHRESHOLD
= alphaThreshold;\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\n\t\t\t\t\t\t#if USE_UV_SCALE_BIAS\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\to.VFX_VARYING_UV.xy
= o.VFX_VARYING_UV.xy * uvScale + uvBias;\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\n\t\t\t\t\t\t#if
defined(VFX_VARYING_POSWS)\n\t\t\t\t\t\to.VFX_VARYING_POSWS = TransformPositionVFXToWorld(vPos);\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t#if
USE_FLIPBOOK\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tVFXUVData uvData = GetUVData(flipBookSize,
invFlipBookSize, o.VFX_VARYING_UV.xy, texIndex);\n\t\t\t\t\t\to.VFX_VARYING_UV.xy
USE_FLIPBOOK\n\t\t\t\t\t\tfloat2 flipBookSize = (float2)0;\n\t\t\t\t\t\t{\n\t\t\t\t\t\t
\ \n\t\t\t\t\t\t flipBookSize = float2(8,8);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\tfloat2
invFlipBookSize = (float2)0;\n\t\t\t\t\t\t{\n\t\t\t\t\t\t \n\t\t\t\t\t\t
\ invFlipBookSize = float2(0.125,0.125);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\tVFXUVData
uvData = GetUVData(flipBookSize, invFlipBookSize, o.VFX_VARYING_UV.xy, texIndex);\n\t\t\t\t\t\to.VFX_VARYING_UV.xy
= uvData.uvs.xy;\n\t\t\t\t\t\t#if USE_FLIPBOOK_INTERPOLATION\n\t\t\t\t\t\to.VFX_VARYING_UV.zw
= uvData.uvs.zw;\n\t\t\t\t\t\to.VFX_VARYING_FRAMEBLEND = uvData.blend;\n\t\t\t\t\t\t#if
USE_FLIPBOOK_MOTIONVECTORS\n\t\t\t\t\t\t\n\t\t\t\t\t\to.VFX_VARYING_MOTIONVECTORSCALE
= motionVectorScale * invFlipBookSize;\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t#ifdef
VFX_VARYING_SMOOTHNESS\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\to.VFX_VARYING_SMOOTHNESS
VFX_VARYING_SMOOTHNESS\n\t\t\t\t\t\t\t\t\tfloat smoothness = (float)0;\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t
\ \n\t\t\t\t\t\t\t\t\t smoothness = (float)0;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\to.VFX_VARYING_SMOOTHNESS
= smoothness;\n\t\t\t\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\t\t\t#if HDRP_MATERIAL_TYPE_STANDARD\n\t\t\t\t\t\t\t\t\t#ifdef
VFX_VARYING_METALLIC\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\to.VFX_VARYING_METALLIC
= metallic;\n\t\t\t\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\t\t\t#elif HDRP_MATERIAL_TYPE_SPECULAR\n\t\t\t\t\t\t\t\t\t#ifdef
VFX_VARYING_SPECULAR\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\to.VFX_VARYING_SPECULAR
= specularColor;\n\t\t\t\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\t\t\t#elif HDRP_MATERIAL_TYPE_TRANSLUCENT\n\t\t\t\t\t\t\t\t\t#ifdef
VFX_VARYING_THICKNESS\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\to.VFX_VARYING_THICKNESS
VFX_VARYING_THICKNESS\n\t\t\t\t\t\t\t\t\tfloat thickness = (float)0;\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t
\ \n\t\t\t\t\t\t\t\t\t thickness = (float)0.4706581;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\to.VFX_VARYING_THICKNESS
= thickness;\n\t\t\t\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\t\t\t#if
USE_NORMAL_MAP\n\t\t\t\t\t\t\t\t\t#ifdef VFX_VARYING_NORMALSCALE\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\to.VFX_VARYING_NORMALSCALE
USE_NORMAL_MAP\n\t\t\t\t\t\t\t\t\t#ifdef VFX_VARYING_NORMALSCALE\n\t\t\t\t\t\t\t\t\tfloat
normalScale = (float)0;\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t
\ normalScale = (float)1;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\to.VFX_VARYING_NORMALSCALE
= normalScale;\n\t\t\t\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\t\t\t#if
HDRP_USE_EMISSIVE_MAP\n\t\t\t\t\t\t\t\t\t#ifdef VFX_VARYING_EMISSIVESCALE\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\to.VFX_VARYING_EMISSIVESCALE
= emissiveScale;\n\t\t\t\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\t\t\t#ifdef
@ -1048,13 +1055,13 @@ VisualEffectResource:
data[0]: -1
data[1]: -1
data[2]: -1
data[3]: 1
data[3]: 14
- op: 1
valueIndex: 1
data[0]: -1
data[1]: -1
data[2]: -1
data[3]: 1
data[3]: 13
- op: 1
valueIndex: 2
data[0]: -1
@ -1066,13 +1073,13 @@ VisualEffectResource:
data[0]: -1
data[1]: -1
data[2]: -1
data[3]: 1
data[3]: 7
- op: 1
valueIndex: 4
data[0]: -1
data[1]: -1
data[2]: -1
data[3]: 1
data[3]: 6
- op: 1
valueIndex: 5
data[0]: -1
@ -1084,91 +1091,61 @@ VisualEffectResource:
data[0]: -1
data[1]: -1
data[2]: -1
data[3]: 1
- op: 1
valueIndex: 7
data[0]: -1
data[1]: -1
data[2]: -1
data[3]: 1
data[3]: 2
- op: 1
valueIndex: 8
data[0]: -1
data[1]: -1
data[2]: -1
data[3]: 1
- op: 1
valueIndex: 9
data[0]: -1
data[1]: -1
data[2]: -1
data[3]: 1
- op: 1
data[3]: 2
- op: 57
valueIndex: 10
data[0]: -1
data[0]: 0
data[1]: -1
data[2]: -1
data[3]: 1
data[3]: 0
- op: 1
valueIndex: 11
data[0]: -1
data[1]: -1
data[2]: -1
data[3]: 1
- op: 1
- op: 56
valueIndex: 12
data[0]: -1
data[1]: -1
data[2]: -1
data[3]: 2
- op: 1
valueIndex: 14
data[0]: -1
data[1]: -1
data[2]: -1
data[3]: 1
- op: 1
valueIndex: 15
data[0]: -1
data[1]: -1
data[2]: -1
data[3]: 1
- op: 2
valueIndex: 16
data[0]: 1
data[1]: 3
data[1]: -1
data[2]: -1
data[3]: -1
data[3]: 0
- op: 1
valueIndex: 16
data[0]: -1
data[1]: -1
data[2]: -1
data[3]: 1
- op: 1
valueIndex: 17
data[0]: -1
data[1]: -1
data[2]: -1
data[3]: 1
- op: 1
valueIndex: 18
data[0]: -1
data[1]: -1
data[2]: -1
data[3]: 1
- op: 31
valueIndex: 19
data[0]: 0
data[1]: 2
data[2]: -1
data[3]: 1
- op: 1
valueIndex: 20
data[0]: -1
data[1]: -1
data[2]: -1
data[3]: 1
- op: 1
data[3]: 3
- op: 6
valueIndex: 21
data[0]: -1
data[1]: -1
data[2]: -1
data[3]: 1
data[3]: -1
- op: 1
valueIndex: 22
data[0]: -1
data[1]: -1
data[2]: -1
data[3]: 13
data[3]: 1
- op: 1
valueIndex: 23
data[0]: -1
@ -1192,37 +1169,13 @@ VisualEffectResource:
data[0]: -1
data[1]: -1
data[2]: -1
data[3]: 1
- op: 1
valueIndex: 27
data[0]: -1
data[1]: -1
data[2]: -1
data[3]: 1
- op: 1
valueIndex: 28
data[0]: -1
data[1]: -1
data[2]: -1
data[3]: 1
data[3]: 3
- op: 1
valueIndex: 29
data[0]: -1
data[1]: -1
data[2]: -1
data[3]: 1
- op: 31
valueIndex: 30
data[0]: 5
data[1]: 4
data[2]: -1
data[3]: 1
- op: 1
valueIndex: 31
data[0]: -1
data[1]: -1
data[2]: -1
data[3]: 1
data[3]: 3
- op: 1
valueIndex: 32
data[0]: -1
@ -1234,165 +1187,21 @@ VisualEffectResource:
data[0]: -1
data[1]: -1
data[2]: -1
data[3]: 1
data[3]: 3
- op: 1
valueIndex: 34
data[0]: -1
data[1]: -1
data[2]: -1
data[3]: 14
- op: 1
valueIndex: 35
data[0]: -1
data[1]: -1
data[2]: -1
data[3]: 6
- op: 20
valueIndex: 36
data[0]: 14
data[1]: -1
data[2]: -1
data[3]: 1
- op: 20
valueIndex: 37
data[0]: 16
data[1]: -1
data[2]: -1
data[3]: 1
- op: 1
valueIndex: 38
data[0]: -1
data[1]: -1
data[2]: -1
data[3]: 7
data[3]: 3
- op: 1
valueIndex: 39
data[0]: -1
data[1]: -1
data[2]: -1
data[3]: 7
- op: 30
valueIndex: 40
data[0]: 28
data[1]: 8
data[2]: -1
data[3]: 1
- op: 27
valueIndex: 41
data[0]: 12
data[1]: 15
data[2]: -1
data[3]: 2
- op: 31
valueIndex: 43
data[0]: 13
data[1]: 4
data[2]: -1
data[3]: 1
- op: 31
valueIndex: 44
data[0]: 7
data[1]: 4
data[2]: -1
data[3]: 1
- op: 57
valueIndex: 45
data[0]: 32
data[1]: -1
data[2]: -1
data[3]: 0
- op: 3
valueIndex: 46
data[0]: 6
data[1]: 30
data[2]: 29
data[3]: -1
- op: 3
valueIndex: 49
data[0]: 27
data[1]: 26
data[2]: 25
data[3]: -1
- op: 1
valueIndex: 52
data[0]: -1
data[1]: -1
data[2]: -1
data[3]: 1
- op: 3
valueIndex: 53
data[0]: 23
data[1]: 22
data[2]: 21
data[3]: -1
- op: 3
valueIndex: 56
data[0]: 31
data[1]: 19
data[2]: 18
data[3]: -1
- op: 1
valueIndex: 59
data[0]: -1
data[1]: -1
data[2]: -1
data[3]: 1
- op: 27
valueIndex: 60
data[0]: 24
data[1]: 17
data[2]: -1
data[3]: 1
- op: 1
valueIndex: 61
data[0]: -1
data[1]: -1
data[2]: -1
data[3]: 1
- op: 1
valueIndex: 62
data[0]: -1
data[1]: -1
data[2]: -1
data[3]: 1
- op: 6
valueIndex: 63
data[0]: -1
data[1]: -1
data[2]: -1
data[3]: -1
- op: 3
valueIndex: 64
data[0]: 11
data[1]: 10
data[2]: 9
data[3]: -1
- op: 1
valueIndex: 67
data[0]: -1
data[1]: -1
data[2]: -1
data[3]: 1
- op: 56
valueIndex: 68
data[0]: 20
data[1]: -1
data[2]: -1
data[3]: 0
- op: 1
valueIndex: 72
data[0]: -1
data[1]: -1
data[2]: -1
data[3]: 1
- op: 1
valueIndex: 73
data[0]: -1
data[1]: -1
data[2]: -1
data[3]: 1
- op: 9
valueIndex: 74
valueIndex: 40
data[0]: -1
data[1]: -1
data[2]: -1
@ -1403,85 +1212,49 @@ VisualEffectResource:
m_PropertySheet:
m_Float:
m_Array:
- m_ExpressionIndex: 0
m_Value: 1
- m_ExpressionIndex: 1
m_Value: 8
- m_ExpressionIndex: 2
m_Value: 0.001
- m_ExpressionIndex: 3
m_Value: 8
- m_ExpressionIndex: 4
m_Value: 0
- m_ExpressionIndex: 5
m_Value: 1
- m_ExpressionIndex: 6
m_Value: 0
- m_ExpressionIndex: 7
m_Value: 1
- m_ExpressionIndex: 8
m_Value: 2
- m_ExpressionIndex: 9
m_Value: 0
- m_ExpressionIndex: 10
m_Value: 0.8
- m_ExpressionIndex: 11
m_Value: -0.2
- m_ExpressionIndex: 13
m_Value: 10
- m_ExpressionIndex: 14
m_Value: 0
- m_ExpressionIndex: 16
- m_ExpressionIndex: 5
m_Value: 0.4706581
- m_ExpressionIndex: 18
m_Value: 0.333
- m_ExpressionIndex: 19
m_Value: 1
- m_ExpressionIndex: 21
m_Value: -0.333
- m_ExpressionIndex: 22
m_Value: 0.8
- m_ExpressionIndex: 23
m_Value: -0.333
- m_ExpressionIndex: 24
m_Value: 1
- m_ExpressionIndex: 25
- m_ExpressionIndex: 9
m_Value: 2
- m_ExpressionIndex: 26
m_Value: 3
- m_ExpressionIndex: 27
m_Value: 2
- m_ExpressionIndex: 29
m_Value: 0
- m_ExpressionIndex: 30
m_Value: 1
- m_ExpressionIndex: 31
m_Value: 0.333
- m_ExpressionIndex: 45
m_Value: 2
- m_ExpressionIndex: 48
m_Value: 6
- m_ExpressionIndex: 50
m_Value: 12
- m_ExpressionIndex: 51
m_Value: 360
- m_ExpressionIndex: 54
- m_ExpressionIndex: 11
m_Value: 0.1
- m_ExpressionIndex: 56
m_Value: 2
- m_ExpressionIndex: 57
- m_ExpressionIndex: 12
m_Value: 1
- m_ExpressionIndex: 15
m_Value: 360
- m_ExpressionIndex: 16
m_Value: 0
- m_ExpressionIndex: 17
m_Value: 12
- m_ExpressionIndex: 18
m_Value: 6
- m_ExpressionIndex: 21
m_Value: 2
m_Vector2f:
m_Array:
- m_ExpressionIndex: 12
m_Value: {x: 1, y: 1}
- m_ExpressionIndex: 6
m_Value: {x: 0.125, y: 0.125}
- m_ExpressionIndex: 7
m_Value: {x: 8, y: 8}
m_Vector3f:
m_Array: []
m_Array:
- m_ExpressionIndex: 13
m_Value: {x: -0.2, y: 0.8, z: 0}
- m_ExpressionIndex: 19
m_Value: {x: 0.333, y: 1, z: 0.333}
- m_ExpressionIndex: 20
m_Value: {x: -0.333, y: 0.8, z: -0.333}
- m_ExpressionIndex: 22
m_Value: {x: 2, y: 3, z: 2}
- m_ExpressionIndex: 23
m_Value: {x: 0, y: 1, z: 0}
m_Vector4f:
m_Array: []
m_Uint:
m_Array:
- m_ExpressionIndex: 33
- m_ExpressionIndex: 4
m_Value: 0
m_Int:
m_Array: []
@ -1489,7 +1262,7 @@ VisualEffectResource:
m_Array: []
m_AnimationCurve:
m_Array:
- m_ExpressionIndex: 20
- m_ExpressionIndex: 1
m_Value:
serializedVersion: 2
m_Curve:
@ -1516,7 +1289,7 @@ VisualEffectResource:
m_RotationOrder: 4
m_Gradient:
m_Array:
- m_ExpressionIndex: 32
- m_ExpressionIndex: 0
m_Value:
serializedVersion: 2
key0: {r: 1, g: 1, b: 1, a: 0}
@ -1548,15 +1321,15 @@ VisualEffectResource:
m_NumAlphaKeys: 4
m_NamedObject:
m_Array:
- m_ExpressionIndex: 36
- m_ExpressionIndex: 3
m_Value: {fileID: 2800000, guid: 0bd50cf212584ed41991d99dbc392d8e, type: 3}
- m_ExpressionIndex: 37
- m_ExpressionIndex: 24
m_Value: {fileID: 2800000, guid: c03f7fa22ef5bcb42b27e107740f509f, type: 3}
m_Bool:
m_Array: []
m_ExposedExpressions:
- nameId: smokeAnimSpeed
index: 45
index: 21
m_Buffers:
- type: 1
size: 832
@ -1745,7 +1518,7 @@ VisualEffectResource:
temporaryBuffers: []
values:
- nameId: Rate
index: 40
index: 2
params: []
processor: {fileID: 0}
shaderSourceIndex: -1
@ -1772,9 +1545,9 @@ VisualEffectResource:
index: 7
values:
- nameId: bounds_center
index: 43
index: 23
- nameId: bounds_size
index: 44
index: 22
tasks:
- type: 536870912
buffers:
@ -1787,24 +1560,12 @@ VisualEffectResource:
- nameId: sourceAttributeBuffer
index: 2
temporaryBuffers: []
values:
- nameId: A_a
index: 46
- nameId: B_a
index: 47
- nameId: A_b
index: 48
- nameId: B_b
index: 50
- nameId: A_c
index: 57
- nameId: B_c
index: 51
values: []
params:
- nameId: bounds_center
index: 43
index: 23
- nameId: bounds_size
index: 44
index: 22
processor: {fileID: 0}
shaderSourceIndex: 0
- type: 805306368
@ -1818,15 +1579,9 @@ VisualEffectResource:
temporaryBuffers: []
values:
- nameId: FrameRate_a
index: 45
index: 21
- nameId: deltaTime_a
index: 52
- nameId: Velocity_b
index: 53
- nameId: Drag_b
index: 41
- nameId: dragCoefficient_c
index: 54
index: 14
params: []
processor: {fileID: 0}
shaderSourceIndex: 1
@ -1843,7 +1598,7 @@ VisualEffectResource:
temporaryBuffers: []
values:
- nameId: localToWorld
index: 58
index: 25
params: []
processor: {fileID: 0}
shaderSourceIndex: 3
@ -1858,27 +1613,13 @@ VisualEffectResource:
temporaryBuffers: []
values:
- nameId: Size_a
index: 55
- nameId: Size_b
index: 56
index: 10
- nameId: Color_d
index: 42
- nameId: invSoftParticlesFadeDistance
index: 49
- nameId: flipBookSize
index: 15
- nameId: invFlipBookSize
index: 39
- nameId: smoothness
index: 34
- nameId: thickness
index: 35
- nameId: normalScale
index: 38
index: 8
- nameId: baseColorMap
index: 36
index: 3
- nameId: normalMap
index: 37
index: 24
params:
- nameId: sortPriority
index: 0

View file

@ -63,7 +63,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
m_IsActive: 1
--- !u!4 &4731626929094548426
Transform:
m_ObjectHideFlags: 0
@ -111,6 +111,7 @@ MeshRenderer:
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
@ -155,7 +156,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!4 &4731626929341064471
Transform:
m_ObjectHideFlags: 0
@ -195,6 +196,7 @@ MeshRenderer:
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0

View file

@ -26,7 +26,7 @@ RenderSettings:
m_AmbientIntensity: 1
m_AmbientMode: 0
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0}
m_SkyboxMaterial: {fileID: 0}
m_HaloStrength: 0.5
m_FlareStrength: 1
m_FlareFadeSpeed: 3
@ -38,7 +38,7 @@ RenderSettings:
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 170076734}
m_IndirectSpecularColor: {r: 0.18028378, g: 0.22571412, b: 0.30692285, a: 1}
m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1}
m_UseRadianceAmbientProbe: 0
--- !u!157 &3
LightmapSettings:
@ -669,5 +669,15 @@ PrefabInstance:
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4731626929094548425, guid: 2cf41770dc7914b46aa31a442508dd25,
type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4731626929341064470, guid: 2cf41770dc7914b46aa31a442508dd25,
type: 3}
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 2cf41770dc7914b46aa31a442508dd25, type: 3}

View file

@ -11,11 +11,17 @@ namespace Visualizer
#pragma warning restore 649
private Renderer renderer_;
private Texture2D texture2D_;
void Start()
{
renderer_ = panel.GetComponent<Renderer>();
renderer_.material.mainTexture = kinectManagerBehaviour.KinectSensor.InfraredCamera.Data;
texture2D_ = new Texture2D(512, 512);
}
void Update()
{
renderer_.material.SetTexture("_BaseColorMap", kinectManagerBehaviour.KinectSensor.InfraredCamera.Data);
}
}
}