Browse Source

360 render fix

main
cailean 9 months ago
parent
commit
ccbd59b1cb
  1. 2
      Assets/10_URPEquirectangularCamera/CubeMapMat.mat
  2. 5
      Assets/10_URPEquirectangularCamera/Scripts/CubemapRender.cs
  3. 5
      Assets/10_URPEquirectangularCamera/Scripts/ShaderManiuplation.cs
  4. 37
      Assets/6_Scenes/Beep.unity
  5. 2
      Assets/ML-Agents/Timers/Beep_timers.json
  6. 50
      Assets/Settings/HDRPDefaultResources/C Default.asset

2
Assets/10_URPEquirectangularCamera/CubeMapMat.mat

@ -69,7 +69,7 @@ Material:
m_Scale: {x: 1, y: 1} m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0} m_Offset: {x: 0, y: 0}
- _MainTex: - _MainTex:
m_Texture: {fileID: 8400000, guid: 2906870b7cedc7d44bcee179b8a7c2d6, type: 2} m_Texture: {fileID: 8400000, guid: 5ca23319067f60b43a60a3bcac0d60fb, type: 2}
m_Scale: {x: 1, y: 1} m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0} m_Offset: {x: 0, y: 0}
- _MetallicGlossMap: - _MetallicGlossMap:

5
Assets/10_URPEquirectangularCamera/Scripts/CubemapRender.cs

@ -21,11 +21,13 @@ public class CubemapRender : MonoBehaviour
} }
void Update() void Update()
{
if(this.isActiveAndEnabled)
{ {
if (cubeMap1K != null && cubeMap4K != null) if (cubeMap1K != null && cubeMap4K != null)
{ {
// Render the scene to the cubemap // Render the scene to the cubemap
if (m_4k) if (m_4k && Application.isPlaying)
{ {
cam.RenderToCubemap(cubeMap4K, faceMask); cam.RenderToCubemap(cubeMap4K, faceMask);
mat.SetTexture("_MainTex", cubeMap4K); mat.SetTexture("_MainTex", cubeMap4K);
@ -38,4 +40,5 @@ public class CubemapRender : MonoBehaviour
} }
} }
}
} }

5
Assets/10_URPEquirectangularCamera/Scripts/ShaderManiuplation.cs

@ -12,7 +12,6 @@ using UnityEngine.Rendering.HighDefinition;
using UnityEngine.UI; using UnityEngine.UI;
using UnityEngine.Windows.WebCam; using UnityEngine.Windows.WebCam;
[ExecuteInEditMode]
public class ShaderManiuplation : MonoBehaviour public class ShaderManiuplation : MonoBehaviour
{ {
@ -65,11 +64,11 @@ public class ShaderManiuplation : MonoBehaviour
if (m_ProjectionType == ProjectionType.Squeeze) if (m_ProjectionType == ProjectionType.Squeeze)
{ {
SetShaderSqueezed(m_SqueezedResolutionIndex, 0.85f, 2.5f, 3.5f, 4f, m_SqueezedCameraHeight); //SetShaderSqueezed(m_SqueezedResolutionIndex, 0.85f, 2.5f, 3.5f, 4f, m_SqueezedCameraHeight);
} }
else if (m_ProjectionType == ProjectionType.Gnomic) else if (m_ProjectionType == ProjectionType.Gnomic)
{ {
SetShaderGnomic(m_GnomiocResolutionIndexLarge, 1.5f, 0.2f, 5.13f, 0.125f, m_GnomicCameraHeight); //SetShaderGnomic(m_GnomiocResolutionIndexLarge, 1.5f, 0.2f, 5.13f, 0.125f, m_GnomicCameraHeight);
} }
} }
} }

37
Assets/6_Scenes/Beep.unity

@ -919,7 +919,7 @@ PrefabInstance:
- target: {fileID: 723609760478697510, guid: 547378ae4bbaf4b4ba24e3243bcd0838, - target: {fileID: 723609760478697510, guid: 547378ae4bbaf4b4ba24e3243bcd0838,
type: 3} type: 3}
propertyPath: m_Enabled propertyPath: m_Enabled
value: 1 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 723609760478697510, guid: 547378ae4bbaf4b4ba24e3243bcd0838, - target: {fileID: 723609760478697510, guid: 547378ae4bbaf4b4ba24e3243bcd0838,
type: 3} type: 3}
@ -946,6 +946,11 @@ PrefabInstance:
propertyPath: m_4k propertyPath: m_4k
value: 1 value: 1
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 933460690407818088, guid: 547378ae4bbaf4b4ba24e3243bcd0838,
type: 3}
propertyPath: m_Enabled
value: 0
objectReference: {fileID: 0}
- target: {fileID: 933460690407818091, guid: 547378ae4bbaf4b4ba24e3243bcd0838, - target: {fileID: 933460690407818091, guid: 547378ae4bbaf4b4ba24e3243bcd0838,
type: 3} type: 3}
propertyPath: m_LocalPosition.x propertyPath: m_LocalPosition.x
@ -8135,7 +8140,7 @@ PrefabInstance:
- target: {fileID: 723609760478697510, guid: 547378ae4bbaf4b4ba24e3243bcd0838, - target: {fileID: 723609760478697510, guid: 547378ae4bbaf4b4ba24e3243bcd0838,
type: 3} type: 3}
propertyPath: m_Enabled propertyPath: m_Enabled
value: 1 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 723609760478697510, guid: 547378ae4bbaf4b4ba24e3243bcd0838, - target: {fileID: 723609760478697510, guid: 547378ae4bbaf4b4ba24e3243bcd0838,
type: 3} type: 3}
@ -8162,6 +8167,11 @@ PrefabInstance:
propertyPath: m_4k propertyPath: m_4k
value: 1 value: 1
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 933460690407818088, guid: 547378ae4bbaf4b4ba24e3243bcd0838,
type: 3}
propertyPath: m_Enabled
value: 0
objectReference: {fileID: 0}
- target: {fileID: 933460690407818091, guid: 547378ae4bbaf4b4ba24e3243bcd0838, - target: {fileID: 933460690407818091, guid: 547378ae4bbaf4b4ba24e3243bcd0838,
type: 3} type: 3}
propertyPath: m_LocalPosition.x propertyPath: m_LocalPosition.x
@ -10279,7 +10289,7 @@ PrefabInstance:
- target: {fileID: 723609760478697510, guid: 547378ae4bbaf4b4ba24e3243bcd0838, - target: {fileID: 723609760478697510, guid: 547378ae4bbaf4b4ba24e3243bcd0838,
type: 3} type: 3}
propertyPath: m_Enabled propertyPath: m_Enabled
value: 1 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 723609760478697510, guid: 547378ae4bbaf4b4ba24e3243bcd0838, - target: {fileID: 723609760478697510, guid: 547378ae4bbaf4b4ba24e3243bcd0838,
type: 3} type: 3}
@ -10306,6 +10316,11 @@ PrefabInstance:
propertyPath: m_4k propertyPath: m_4k
value: 1 value: 1
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 933460690407818088, guid: 547378ae4bbaf4b4ba24e3243bcd0838,
type: 3}
propertyPath: m_Enabled
value: 0
objectReference: {fileID: 0}
- target: {fileID: 933460690407818091, guid: 547378ae4bbaf4b4ba24e3243bcd0838, - target: {fileID: 933460690407818091, guid: 547378ae4bbaf4b4ba24e3243bcd0838,
type: 3} type: 3}
propertyPath: m_LocalPosition.x propertyPath: m_LocalPosition.x
@ -13505,7 +13520,7 @@ PrefabInstance:
- target: {fileID: 723609760478697510, guid: 547378ae4bbaf4b4ba24e3243bcd0838, - target: {fileID: 723609760478697510, guid: 547378ae4bbaf4b4ba24e3243bcd0838,
type: 3} type: 3}
propertyPath: m_Direction propertyPath: m_Direction
value: 1 value: 3
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 723609760478697510, guid: 547378ae4bbaf4b4ba24e3243bcd0838, - target: {fileID: 723609760478697510, guid: 547378ae4bbaf4b4ba24e3243bcd0838,
type: 3} type: 3}
@ -13809,7 +13824,7 @@ PrefabInstance:
- target: {fileID: 723609760478697510, guid: 547378ae4bbaf4b4ba24e3243bcd0838, - target: {fileID: 723609760478697510, guid: 547378ae4bbaf4b4ba24e3243bcd0838,
type: 3} type: 3}
propertyPath: m_Enabled propertyPath: m_Enabled
value: 1 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 723609760478697510, guid: 547378ae4bbaf4b4ba24e3243bcd0838, - target: {fileID: 723609760478697510, guid: 547378ae4bbaf4b4ba24e3243bcd0838,
type: 3} type: 3}
@ -13836,6 +13851,11 @@ PrefabInstance:
propertyPath: m_4k propertyPath: m_4k
value: 1 value: 1
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 933460690407818088, guid: 547378ae4bbaf4b4ba24e3243bcd0838,
type: 3}
propertyPath: m_Enabled
value: 0
objectReference: {fileID: 0}
- target: {fileID: 933460690407818091, guid: 547378ae4bbaf4b4ba24e3243bcd0838, - target: {fileID: 933460690407818091, guid: 547378ae4bbaf4b4ba24e3243bcd0838,
type: 3} type: 3}
propertyPath: m_LocalPosition.x propertyPath: m_LocalPosition.x
@ -15845,7 +15865,7 @@ PrefabInstance:
- target: {fileID: 723609760478697510, guid: 547378ae4bbaf4b4ba24e3243bcd0838, - target: {fileID: 723609760478697510, guid: 547378ae4bbaf4b4ba24e3243bcd0838,
type: 3} type: 3}
propertyPath: m_Enabled propertyPath: m_Enabled
value: 1 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 723609760478697510, guid: 547378ae4bbaf4b4ba24e3243bcd0838, - target: {fileID: 723609760478697510, guid: 547378ae4bbaf4b4ba24e3243bcd0838,
type: 3} type: 3}
@ -15877,6 +15897,11 @@ PrefabInstance:
propertyPath: m_4k propertyPath: m_4k
value: 1 value: 1
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 933460690407818088, guid: 547378ae4bbaf4b4ba24e3243bcd0838,
type: 3}
propertyPath: m_Enabled
value: 0
objectReference: {fileID: 0}
- target: {fileID: 933460690407818091, guid: 547378ae4bbaf4b4ba24e3243bcd0838, - target: {fileID: 933460690407818091, guid: 547378ae4bbaf4b4ba24e3243bcd0838,
type: 3} type: 3}
propertyPath: m_LocalPosition.x propertyPath: m_LocalPosition.x

2
Assets/ML-Agents/Timers/Beep_timers.json

@ -1 +1 @@
{"count":1,"self":3371.3729536,"total":3372.2094515,"children":{"InitializeActuators":{"count":1,"self":0.0015160999999999998,"total":0.0015160999999999998,"children":null},"InitializeSensors":{"count":1,"self":0,"total":0,"children":null},"AgentSendState":{"count":4539,"self":0.0402017,"total":0.0550074,"children":{"CollectObservations":{"count":908,"self":0.012523699999999999,"total":0.012523699999999999,"children":null},"WriteActionMask":{"count":908,"self":0,"total":0,"children":null},"RequestDecision":{"count":908,"self":0.0022819999999999997,"total":0.0022819999999999997,"children":null}}},"DecideAction":{"count":4539,"self":0.75481409999999993,"total":0.7588473,"children":{"RayPerceptionSensor.Perceive":{"count":908,"self":0.0040332,"total":0.0040332,"children":null}}},"AgentAct":{"count":4539,"self":0.0210827,"total":0.0210827,"children":null}},"gauges":{},"metadata":{"timer_format_version":"0.1.0","start_time_seconds":"1712836516","unity_version":"2023.2.8f1","command_line_arguments":"C:\\Program Files\\Unity\\Hub\\Editor\\2023.2.8f1\\Editor\\Unity.exe -projectpath C:\\Users\\Gebruiker\\Documents\\BB_BeautyBeep\\git\\beep-final -useHub -hubIPC -cloudEnvironment production","communication_protocol_version":"1.5.0","com.unity.ml-agents_version":"2.3.0-exp.3","scene_name":"Beep","end_time_seconds":"1712839888"}} {"count":1,"self":225.4721792,"total":225.53041919999998,"children":{"InitializeActuators":{"count":1,"self":0.0020014,"total":0.0020014,"children":null},"InitializeSensors":{"count":1,"self":0.0030196999999999997,"total":0.0030196999999999997,"children":null},"AgentSendState":{"count":16,"self":0,"total":0.00050309999999999992,"children":{"CollectObservations":{"count":4,"self":0.00050309999999999992,"total":0.00050309999999999992,"children":null},"WriteActionMask":{"count":4,"self":0,"total":0,"children":null},"RequestDecision":{"count":4,"self":0,"total":0,"children":null}}},"DecideAction":{"count":16,"self":0.0501965,"total":0.0501965,"children":{"RayPerceptionSensor.Perceive":{"count":4,"self":0,"total":0,"children":null}}},"AgentAct":{"count":16,"self":0.0025109,"total":0.0025109,"children":null}},"gauges":{},"metadata":{"timer_format_version":"0.1.0","start_time_seconds":"1712844888","unity_version":"2023.2.8f1","command_line_arguments":"C:\\Program Files\\Unity\\Hub\\Editor\\2023.2.8f1\\Editor\\Unity.exe -projectpath C:\\Users\\caile\\Desktop\\Projects\\24_3-Beep\\beep-final -useHub -hubIPC -cloudEnvironment production","communication_protocol_version":"1.5.0","com.unity.ml-agents_version":"2.3.0-exp.3","scene_name":"Beep","end_time_seconds":"1712845113"}}

50
Assets/Settings/HDRPDefaultResources/C Default.asset

@ -245,6 +245,55 @@ MonoBehaviour:
blueOutBlueIn: blueOutBlueIn:
m_OverrideState: 1 m_OverrideState: 1
m_Value: 100 m_Value: 100
--- !u!114 &-5482108122124222339
MonoBehaviour:
m_ObjectHideFlags: 3
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 56b145d2b9ee1ac4f846968484e7485a, type: 3}
m_Name: ContactShadows
m_EditorClassIdentifier:
active: 0
quality:
m_OverrideState: 0
m_Value: 1
enable:
m_OverrideState: 0
m_Value: 0
length:
m_OverrideState: 0
m_Value: 0.15
opacity:
m_OverrideState: 0
m_Value: 1
distanceScaleFactor:
m_OverrideState: 0
m_Value: 0.5
maxDistance:
m_OverrideState: 0
m_Value: 50
minDistance:
m_OverrideState: 0
m_Value: 0
fadeDistance:
m_OverrideState: 0
m_Value: 5
fadeInDistance:
m_OverrideState: 0
m_Value: 0
rayBias:
m_OverrideState: 0
m_Value: 0.2
thicknessScale:
m_OverrideState: 0
m_Value: 0.15
m_SampleCount:
m_OverrideState: 0
m_Value: 10
--- !u!114 &11400000 --- !u!114 &11400000
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -258,6 +307,7 @@ MonoBehaviour:
m_Name: C Default m_Name: C Default
m_EditorClassIdentifier: m_EditorClassIdentifier:
components: components:
- {fileID: -5482108122124222339}
- {fileID: 7852537614041253154} - {fileID: 7852537614041253154}
- {fileID: 9219839369190479486} - {fileID: 9219839369190479486}
- {fileID: 7686318427622180703} - {fileID: 7686318427622180703}

Loading…
Cancel
Save