sebastienlagarde
7 年前
当前提交
a0d8e8b4
共有 16 个文件被更改,包括 334 次插入 和 55 次删除
-
6ScriptableRenderPipeline/Core/CoreRP/CoreUtils.cs
-
6ScriptableRenderPipeline/Core/CoreRP/ShaderLibrary/Debug.hlsl
-
71ScriptableRenderPipeline/HDRenderPipeline/HDRP/Debug/DebugDisplay.hlsl
-
46ScriptableRenderPipeline/HDRenderPipeline/HDRP/Debug/DebugFullScreen.shader
-
2ScriptableRenderPipeline/HDRenderPipeline/HDRP/Debug/DebugViewTiles.shader
-
1ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/HDAssetFactory.cs
-
30ScriptableRenderPipeline/HDRenderPipeline/HDRP/HDRenderPipeline.cs
-
3ScriptableRenderPipeline/HDRenderPipeline/HDRP/HDStringConstants.cs
-
2ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/Deferred.shader
-
2ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/LightLoop/Deferred.compute
-
33ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/LightLoop/LightLoop.cs
-
1ScriptableRenderPipeline/HDRenderPipeline/HDRP/RenderPipelineResources/RenderPipelineResources.cs
-
58ScriptableRenderPipeline/Core/CoreRP/MousePositionDebug.cs
-
11ScriptableRenderPipeline/Core/CoreRP/MousePositionDebug.cs.meta
-
1ScriptableRenderPipeline/HDRenderPipeline/HDRP/RenderPipelineResources/DebugFont.tga
-
116ScriptableRenderPipeline/HDRenderPipeline/HDRP/RenderPipelineResources/DebugFont.tga.meta
|
|||
using System; |
|||
|
|||
namespace UnityEngine.Experimental.Rendering |
|||
{ |
|||
public class MousePositionDebug |
|||
{ |
|||
// Singleton
|
|||
private static MousePositionDebug s_Instance = null; |
|||
|
|||
static public MousePositionDebug instance |
|||
{ |
|||
get |
|||
{ |
|||
if (s_Instance == null) |
|||
{ |
|||
s_Instance = new MousePositionDebug(); |
|||
} |
|||
|
|||
return s_Instance; |
|||
} |
|||
} |
|||
|
|||
private Vector2 m_mousePosition = Vector2.zero; |
|||
|
|||
private void OnSceneGUI(UnityEditor.SceneView sceneview) |
|||
{ |
|||
m_mousePosition = Event.current.mousePosition; |
|||
} |
|||
|
|||
public void Build() |
|||
{ |
|||
#if UNITY_EDITOR
|
|||
UnityEditor.SceneView.onSceneGUIDelegate -= OnSceneGUI; |
|||
UnityEditor.SceneView.onSceneGUIDelegate += OnSceneGUI; |
|||
#endif
|
|||
} |
|||
|
|||
public void Cleanup() |
|||
{ |
|||
#if UNITY_EDITOR
|
|||
UnityEditor.SceneView.onSceneGUIDelegate -= OnSceneGUI; |
|||
#endif
|
|||
} |
|||
|
|||
public Vector2 GetMousePosition(float ScreenHeight) |
|||
{ |
|||
Vector2 mousePixelCoord = Input.mousePosition; |
|||
#if UNITY_EDITOR
|
|||
if (!UnityEditor.EditorApplication.isPlayingOrWillChangePlaymode) |
|||
{ |
|||
mousePixelCoord = m_mousePosition; |
|||
mousePixelCoord.y = (ScreenHeight - 1.0f) - mousePixelCoord.y; |
|||
} |
|||
#endif
|
|||
return mousePixelCoord; |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 16870bb28557a8f4182d1c8191e951a5 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
1
ScriptableRenderPipeline/HDRenderPipeline/HDRP/RenderPipelineResources/DebugFont.tga
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
|
|||
fileFormatVersion: 2 |
|||
guid: a3ad2df0e49aaa341a3b3a80f93b3f66 |
|||
TextureImporter: |
|||
fileIDToRecycleName: {} |
|||
externalObjects: {} |
|||
serializedVersion: 5 |
|||
mipmaps: |
|||
mipMapMode: 0 |
|||
enableMipMap: 0 |
|||
sRGBTexture: 0 |
|||
linearTexture: 0 |
|||
fadeOut: 0 |
|||
borderMipMap: 0 |
|||
mipMapsPreserveCoverage: 0 |
|||
alphaTestReferenceValue: 0.5 |
|||
mipMapFadeDistanceStart: 1 |
|||
mipMapFadeDistanceEnd: 3 |
|||
bumpmap: |
|||
convertToNormalMap: 0 |
|||
externalNormalMap: 0 |
|||
heightScale: 0.25 |
|||
normalMapFilter: 0 |
|||
isReadable: 0 |
|||
grayScaleToAlpha: 0 |
|||
generateCubemap: 6 |
|||
cubemapConvolution: 0 |
|||
seamlessCubemap: 0 |
|||
textureFormat: 1 |
|||
maxTextureSize: 2048 |
|||
textureSettings: |
|||
serializedVersion: 2 |
|||
filterMode: -1 |
|||
aniso: -1 |
|||
mipBias: -1 |
|||
wrapU: -1 |
|||
wrapV: -1 |
|||
wrapW: -1 |
|||
nPOTScale: 1 |
|||
lightmap: 0 |
|||
compressionQuality: 50 |
|||
spriteMode: 0 |
|||
spriteExtrude: 1 |
|||
spriteMeshType: 1 |
|||
alignment: 0 |
|||
spritePivot: {x: 0.5, y: 0.5} |
|||
spriteBorder: {x: 0, y: 0, z: 0, w: 0} |
|||
spritePixelsToUnits: 100 |
|||
alphaUsage: 1 |
|||
alphaIsTransparency: 0 |
|||
spriteTessellationDetail: -1 |
|||
textureType: 0 |
|||
textureShape: 1 |
|||
singleChannelComponent: 0 |
|||
maxTextureSizeSet: 0 |
|||
compressionQualitySet: 0 |
|||
textureFormatSet: 0 |
|||
platformSettings: |
|||
- serializedVersion: 2 |
|||
buildTarget: DefaultTexturePlatform |
|||
maxTextureSize: 2048 |
|||
resizeAlgorithm: 0 |
|||
textureFormat: -1 |
|||
textureCompression: 1 |
|||
compressionQuality: 50 |
|||
crunchedCompression: 0 |
|||
allowsAlphaSplitting: 0 |
|||
overridden: 0 |
|||
androidETC2FallbackOverride: 0 |
|||
- serializedVersion: 2 |
|||
buildTarget: Standalone |
|||
maxTextureSize: 2048 |
|||
resizeAlgorithm: 0 |
|||
textureFormat: -1 |
|||
textureCompression: 1 |
|||
compressionQuality: 50 |
|||
crunchedCompression: 0 |
|||
allowsAlphaSplitting: 0 |
|||
overridden: 0 |
|||
androidETC2FallbackOverride: 0 |
|||
- serializedVersion: 2 |
|||
buildTarget: iPhone |
|||
maxTextureSize: 2048 |
|||
resizeAlgorithm: 0 |
|||
textureFormat: -1 |
|||
textureCompression: 1 |
|||
compressionQuality: 50 |
|||
crunchedCompression: 0 |
|||
allowsAlphaSplitting: 0 |
|||
overridden: 0 |
|||
androidETC2FallbackOverride: 0 |
|||
- serializedVersion: 2 |
|||
buildTarget: Windows Store Apps |
|||
maxTextureSize: 2048 |
|||
resizeAlgorithm: 0 |
|||
textureFormat: -1 |
|||
textureCompression: 1 |
|||
compressionQuality: 50 |
|||
crunchedCompression: 0 |
|||
allowsAlphaSplitting: 0 |
|||
overridden: 0 |
|||
androidETC2FallbackOverride: 0 |
|||
spriteSheet: |
|||
serializedVersion: 2 |
|||
sprites: [] |
|||
outline: [] |
|||
physicsShape: [] |
|||
bones: [] |
|||
spriteID: |
|||
vertices: [] |
|||
indices: |
|||
edges: [] |
|||
weights: [] |
|||
spritePackingTag: |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
撰写
预览
正在加载...
取消
保存
Reference in new issue