80 Commits

Author SHA1 Message Date
Ben Marsh
b5401083d1 Copy of CL 5906283
Fixed tessellation shader cross-compilation for Vulkan backend.

#rb Rolando.Caloca
#lockdown Marcus.Wassmer
#jira UE-54442

[CL 5952885 by Ben Marsh in 4.22 branch]
2019-04-17 14:58:39 -04:00
Rolando Caloca
6bc186fd3f UE4 - Fix invalid IR on hlslcc potentially causing a crash
#rb none
#fyi Jonas.Meyer
#rnx
#jira UE-71397

[CL 5399410 by Rolando Caloca in 4.22 branch]
2019-03-14 14:04:00 -04:00
Jonas Meyer
7ac8c31b7d Bump shader version for jira UE-71386.
Followup change to the vulkan nan fix.
hlslcc was not generating conditional moves for swizzles, causing the proposed fix to generate a lot of code. this is fixed with this change

#jira UE-71386
#rb rolando.caloca

Code Before:
{
		bvec4 v138 = bvec4(false,false,false,false);
		v138.xyzw = lessThan(floatBitsToUint(v137),uvec4(2139095040u,2139095040u,2139095040u,2139095040u));
		vec4 v139 = vec4(0.000000,0.000000,0.000000,0.000000);
		if (not(v138).x)
		{
			v139.x = 0.000000;
		}
		else
		{
			v139.x = v137.x;
		}
		if (not(v138).y)
		{
			v139.y = 0.000000;
		}
		else
		{
			v139.y = v137.y;
		}
		if (not(v138).z)
		{
			v139.z = 0.000000;
		}
		else
		{
			v139.z = v137.z;
		}
		if (not(v138).w)
		{
			v139.w = 0.000000;
		}
		else
		{
			v139.w = v137.w;
		}
		imageStore( RWLightScattering, ivec3(gl_GlobalInvocationID), v139.xyzw);
	}

Code After

	{
		bvec4 v138 = bvec4(false,false,false,false);
		v138.xyzw = lessThan(floatBitsToUint(v137),uvec4(2139095040u,2139095040u,2139095040u,2139095040u));
		vec4 v139 = vec4(0.000000,0.000000,0.000000,0.000000);
		v139.x = (not(v138).x)?(0.000000):(v137.x);
		v139.y = (not(v138).y)?(0.000000):(v137.y);
		v139.z = (not(v138).z)?(0.000000):(v137.z);
		v139.w = (not(v138).w)?(0.000000):(v137.w);
		imageStore( RWLightScattering, ivec3(gl_GlobalInvocationID), v139.xyzw);
	}

[CL 5382705 by Jonas Meyer in 4.22 branch]
2019-03-13 10:53:17 -04:00
Jonas Meyer
3d13920a21 Fix nans on vulkan.
hlslcc was incorrectly converting conditionals to mix. When one of the operand is a nan, this conversion is incorrect, as the nan will propagate, and thus we get weird bugs where the nans stick around.
#jira UE-71386
#rb rolando.caloca emil.persson

[CL 5380320 by Jonas Meyer in 4.22 branch]
2019-03-13 07:53:00 -04:00
Rolando Caloca
4ea391d26d UE4.22 - Tessellation on Vulkan (experimental, disabled)
#rb none
#jira
#rnx

[CL 5318719 by Rolando Caloca in 4.22 branch]
2019-03-06 15:38:35 -05:00
Ben Marsh
1583f856bd Remove overrides forcing undefined identifier and shadow variable warnings off. Separating out from change to force these settings to create a new PCH to prevent the warning setting being ignored.
#rb none
#jira

[CL 5295892 by Ben Marsh in 4.22 branch]
2019-03-05 11:20:42 -05:00
Rolando Caloca
28f3a69f7e UE4.22 - Modify SPIR-V shader entry point name so it can be found easily while debugging (like Metal)
#rb none
#rnx
#jira UE-70676

[CL 5271453 by Rolando Caloca in 4.22 branch]
2019-03-01 16:20:28 -05:00
Rolando Caloca
8f299c124b UE4.22 - Fix Lumin shaders format
#rnx
#rb none
#jira UE-UE-70308

[CL 5095354 by Rolando Caloca in 4.22 branch]
2019-02-20 14:58:19 -05:00
Rolando Caloca
3fcc5cfd67 UE4.22 - Fix Texture2dArray crash on Vulkan
#rb none
#jira
#rnx
#fyi Mark.Satterthwaite

[CL 4984286 by Rolando Caloca in 4.22 branch]
2019-02-13 13:03:15 -05:00
Marcus Wassmer
a8d6cc952b Merging //UE4/Dev-Main@4700769 to Dev-Rendering (//UE4/Dev-Rendering)
#rb none

[CL 4729861 by Marcus Wassmer in Dev-Rendering branch]
2019-01-15 18:04:38 -05:00
Rolando Caloca
c6ce9f0790 DR - Dump hlslcc flags for Metal direct compiler
- Don't validate on Vulkan shaders unless on debug
#rb none

[CL 4686842 by Rolando Caloca in Dev-Rendering branch]
2019-01-07 17:35:21 -05:00
Rolando Caloca
26cf301968 DR - hlslcc - Fix for samplers getting removed while inlining
#rb none
#rnx

[CL 4683264 by Rolando Caloca in Dev-Rendering branch]
2019-01-04 17:38:16 -05:00
Marcus Wassmer
cbfcbbb93b Merging //UE4/Dev-Main@4662404 to Dev-Rendering (//UE4/Dev-Rendering)
#rb none
Should be just copyright updates

[CL 4680440 by Marcus Wassmer in Dev-Rendering branch]
2019-01-03 19:16:26 -05:00
Rolando Caloca
990204b930 DR - vk - Do not emit precision on bool variables
#rb none
#rnx

[CL 4667349 by Rolando Caloca in Dev-Rendering branch]
2018-12-17 18:47:14 -05:00
Rolando Caloca
016944b119 DR - hlslcc - Retain sizes for global uniforms (ie float3 doesn't get promoted to float4)
#rb none
#rnx

[CL 4662704 by Rolando Caloca in Dev-Rendering branch]
2018-12-14 14:51:12 -05:00
Marcus Wassmer
b5d7db3689 Copying //UE4/Dev-Rendering-HLR@4650617 to Dev-Rendering (//UE4/Dev-Rendering)
#rb none

[CL 4651635 by Marcus Wassmer in Dev-Rendering branch]
2018-12-11 22:25:04 -05:00
Rolando Caloca
b06b4d4ca8 DR - vk - Copy from 4580291
- Fix for unhandled nan in Vulkan shaders
#rb Arciel.Rekman

[CL 4581755 by Rolando Caloca in Dev-Rendering branch]
2018-11-20 08:47:01 -05:00
Rolando Caloca
e5b3a2ed00 DR - vk - Zero-initialize all values in Vulkan shaders
#rb none

[CL 4522601 by Rolando Caloca in Dev-Rendering branch]
2018-10-29 18:40:23 -04:00
Guillaume Abadie
c72b7a33d8 Merging //UE4/Dev-Rendering-Graph@4492585 to Dev-Rendering (//UE4/Dev-Rendering)
This implements the framework to write the high level rendering code into passes organized in direct acyclic graph. It is also unifying the uniform buffer, shader parameters, and pass parameters to same single API: structures with run time meta data. This allow high level user code be extremely seamless, user code debugging, and render graph ease of implementation and debugging.

Issue of collaborative work of Arne Schnober, Brian Karis, Daniel Wright, Marcus Wassmer and Guillaume Abadie.

Names of the graph managed resources are not final.

#rb Arne.Schnober, Brian.Karis, Daniel.Wright, Marcus.Wassmer

[CL 4492694 by Guillaume Abadie in Dev-Rendering branch]
2018-10-19 17:36:35 -04:00
Rolando Caloca
35a988a68a DR - vk - Update to glslang 1.1.82.1
#rb none

[CL 4442796 by Rolando Caloca in Dev-Rendering branch]
2018-10-09 17:50:54 -04:00
Rolando Caloca
e3ec1a0d94 Copying //UE4/Dev-Rendering to //UE4/Dev-Main (Source: //UE4/Dev-Rendering @ 4358666)
#lockdown Nick.Penwarden

============================
  MAJOR FEATURES & CHANGES
============================

Change 4073167 by Krzysztof.Narkowicz

	Added subsurface profile for eye shading model.
	#jira none

Change 4073422 by Krzysztof.Narkowicz

	Added dual specular for subsurface profile shading model.
	#jira none

Change 4075278 by Krzysztof.Narkowicz

	Fixed forward reflection/refraction rendering issues, which caused ShaderModels.Material.Refraction to fail.
	#jira none

Change 4084231 by Krzysztof.Narkowicz

	Dual specular - replace lobe spread with two separate roughness multipliers. Default material roughness is now replaced by an average lobe roughness in order to support non dual specular features.
	#jira none

Change 4092798 by Matt.Collins

	Some HDR refactoring.

	Previously the DisplayOutput and ColorGamut were only set in GameUserSettings.
	I added a Sink that checks the HDR enable. If it's toggled we apply the correct DisplayOutput and ColorGamut for the current platform (this way we get good settings even if you toggle via the console). These settings are still exposed via the console and can be set independently if the user wants.

Change 4096954 by Chris.Bunner

	Added ShaderModelID as scene texture option and renamed existing value to ShaderModelColor to better reflect the internal code.

Change 4111285 by Brian.Karis

	Eye shading update.
	Added Iris normal (disabled). Removed wrap. Fixed contact shadows.

Change 4155261 by Krzysztof.Narkowicz

	Planar reflection prefilter - use scene viewport size instead of reflection target size in order to keep filter size constant in screen space. This makes planar reflection filter more stable in case of dynamic resolution.

	#jira none

Change 4167644 by Krzysztof.Narkowicz

	Global shader map is now stored in multiple DDC entries (one per shader filename) instead of keeping everything in a single one. This allows to skip recompilation of unchanged shader files.

Change 4183727 by Yuriy.ODonnell

	Implemented auto-conversion from deferred to DBuffer decals in forward shading mode (when GBuffer is not available).

	Added support for specular and metallic channels for DBuffer decals, based on work by Chris Bunner.
	This requires DBufferC to be expanded from 2 to 4 channels, leading to slight increase in DBuffer bandwidth and memory requirements.

	Appearance of DBuffer decals is affected by this change, as specular and metallic channel values previously hard-coded in DBufferDecalShared.ush.
	Decals were forced to be non-metallic and have specular of 4% (0.5 numeric value). Now the authored decal material values will be used, which matches GBuffer decals.

	Added support for DBuffer decals with emissive component.

	Most decal types can now be automatically converted, with the exception of stain decals. Those are currently approximated as regular translucent decals.

Change 4197684 by laz.matech

	Added a PostProcess Volume test to the map to test that Cinematic Depth of View can be achieved through PPVs as well. Changed the BP_DepthOfFeildPOV asset - I exposed Focus Method so that it can be disabled for the PPV test. Added a second Hair Model head to the InFocusHair test so that it tests in and out of focus hair models (changed the name of the test to FocusHair).

	#jira none

Change 4225614 by Rolando.Caloca

	DR - Enable depth collision particles on Vulkan mobile

Change 4235489 by Uriel.Doyon

	Removed r.DefaultFeature.PointLightUnits and r.DefaultFeature.SpotLightUnits and replaced them by a single r.DefaultFeature.LightUnits which also controls the units of newly placed rect lights.

	#jira UE-59525

Change 4260154 by Mark.Satterthwaite

	Parallelize the creation of Metal archives and libraries when they are broken up into smaller sub-libraries, this should reduce apparent cook time by going wide across threads on the host of the cooker.

Change 4270594 by Brian.Karis

	Fix for textured rect light L pointing away from plane due to approximate diffuse integration.

Change 4273361 by Daniel.Wright

	Particle Cutouts with 8 verts now always use stochastic approach.  Circle textures with > 234 edges in the convex hull were overflowing the uint64 calculation of the total number of combinations, causing an infinite loop.

Change 4309174 by Mark.Satterthwaite

	Graph device utilization from the driver monitor stats - really helps see how well the GPU is being used.

Change 4310121 by Matt.Collins

	Optmizing RemoveUniformBuffersFromSource. Brings it from ~20% to ~1.5% in my testing.

	#jira none

Change 4312960 by Daniel.Wright

	Fix from Stephen Hill for incorrect light grid culling near the near plane

Change 4314169 by Richard.Wallis

	FShaderCache and associated public structures are now marked as deprecated.  All FShaderCache code hooks removed from MetalRHI, OpenGLDrv and engine Launch/Shutdown logic.

	#jira none

Change 4320760 by Arne.Schober

	DR - Remove SV_Coverage from basepass interpolants when running with Masked in early Depth with ForwardShading as otherwise earlyZ will be disabled (as the PS has to run).
	#jira UE-60992

Change 4334607 by Uriel.Doyon

	Added custom overrides to reset ULightComponent::Intensity to default (in FLightComponentDetails).
	Now settings a light Intesity to default resets the brightness to the archetype brightness.
	This handles correctly cases where the intensity units differs between the two objects.
	Also changed FLocalLightComponentDetails so that changing intensity units kepts the same brightness
	(by recomputing the Intensity).

	#jira UE-61401

Change 4336188 by Rolando.Caloca

	DR - Added -ReduceThreadUsage so programs can use less threads (for SCW )

Change 4337967 by Rolando.Caloca

	DR - Remove unused RHISupportsShaderCompression function

#rb none

[CL 4358751 by Rolando Caloca in Main branch]
2018-09-11 14:44:10 -04:00
rolando caloca
aa9d29eb49 UE4.20 - Copy from DevRendering
- Fix negated index typo causing crash on RWBuffers
- Fix for Vulkan crash when pressing hammering on bixby button on S8
- Fix filtering for validation messages on 1.1.77.0
- Do not require vkstatic-1.lib to link Oculus plugin
#jira UE-61263
#rb none
#rnx

#ROBOMERGE-SOURCE: CL 4175238 in //UE4/Release-4.20/...
#ROBOMERGE-BOT: RELEASE (Release-4.20 -> Release-Staging-4.20)
#ROBOMERGE-AUTHOR: rolando.caloca

[CL 4175239 by rolando caloca in Staging-4.20 branch]
2018-06-29 17:05:00 -04:00
rolando caloca
36d78b244f UE4.20 - Merge fix
#rb none
#jira

#ROBOMERGE-SOURCE: CL 4163690 in //UE4/Release-4.20/...
#ROBOMERGE-BOT: RELEASE (Release-4.20 -> Release-Staging-4.20)
#ROBOMERGE-AUTHOR: rolando.caloca

[CL 4167531 by rolando caloca in Staging-4.20 branch]
2018-06-27 16:59:20 -04:00
rolando caloca
a1d7587dfb UE4.20 - Static analysis fix
#rb none
#jira

#ROBOMERGE-SOURCE: CL 4163683 in //UE4/Release-4.20/...
#ROBOMERGE-BOT: RELEASE (Release-4.20 -> Release-Staging-4.20)
#ROBOMERGE-AUTHOR: rolando.caloca

[CL 4167530 by rolando caloca in Staging-4.20 branch]
2018-06-27 16:59:18 -04:00
rolando caloca
71ef95a394 UE4.20 - VS 2015 Compile fix
#rb none
#jira

#ROBOMERGE-SOURCE: CL 4163678 in //UE4/Release-4.20/...
#ROBOMERGE-BOT: RELEASE (Release-4.20 -> Release-Staging-4.20)
#ROBOMERGE-AUTHOR: rolando.caloca

[CL 4167529 by rolando caloca in Staging-4.20 branch]
2018-06-27 16:59:15 -04:00