You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
#lockdown Nick.Penwarden ===================================== MAJOR FEATURES + CHANGES ===================================== Change 3372740 by Chris.Bunner [Experimental] Partial compute post process pipeline (r.PostProcess.PreferCompute). StencilSceneTexture added to deferred list. A few known issues to be fixed in a follow-up CL. Change 3374187 by Chris.Bunner Volume texture support for CombineLUTs/Tonemap compute pass. Refactored common param code to shared sub-class in CombineLUTs and Tonemap PS/CS. Skip compute post process out-of-bounds writes. Unsigned type conversion fixes. Trimmed compute post process shader inputs. Change 3441680 by Uriel.Doyon Added units to point light intensity, to allow the user to specify the value in candelas or lumens. New point light actors now configure the intensity in candelas by default. Replaced viewport exposure settings by an EV100 slider. Hidding the tone mapper in the show flag now still applies the exposure. Added a new AutoExposure method called EV100 which allows to specify : - MinEV100, MaxEV100 - Calibration Constnat - Exposure Compensation #jira UE-42783 Change 3454636 by Uriel.Doyon Fixed point light having an extra scale of 16 in mobile #jira UE-45272 Change 3454844 by Uriel.Doyon Fixed extra X16 on some point lights #jira UE-45250 Change 3454934 by Chris.Bunner Backing out changelists 3441680, 3454636 and 3454844 for the sake of integration stability. Change 3461206 by Guillaume.Abadie Adds possibility to scene captures and player controller to render no primitives at all. Change 3461207 by Guillaume.Abadie Exposes showflag details to USceneCaptureComponent. This gives the possibility to configure scene capture's showflags in blueprint encapsulated compositing pipeline. #jira UE-6810 Change 3461233 by Chris.Bunner Added Log10 material expression. Added tooltip for Log2 and Log10. Change 3461434 by Michael.Trepka Copy of CL 3456118 In Metal RHI report texture streaming as immediately successful as on D3D to avoid a race-condition leading to deadlock between the Main, Game, Render & RHI threads. #jira UE-44961 Change 3461770 by Benjamin.Hyder Submitting TM-RayTracedDistanceField map Change 3461929 by Marc.Olano Add Sobol blueprint and material node test maps to RenderTest project Change 3462249 by Uriel.Doyon Translucency after DoF is now disabled when showflag postprocess is disabled. Change 3462371 by Brian.Karis VT addressing is now 64bit to support huge sparse virtualized volumes 16bit page tables working. Change 3462936 by Marc.Olano Extend Sobol testing map with comparision between Random Sobol and Next Sobol functions Change 3464394 by Uriel.Doyon Improved synchronization for texture streaming commands. This fixes an issue when accessing FStreamingTexture for pending textures. Change 3464743 by Guillaume.Abadie Adds .usf file extension on all shader's source file names and adds checks to verify them at engine load time. Change 3464818 by Guillaume.Abadie Fixes compilation error in FindShaderRelativePath Change 3465184 by Daniel.Wright r.Shadow.PreShadowResolutionFactor 1.0 on Epic shadow settings Change 3465283 by Marc.Olano Update Sobol Gray code tables to match random order tables Change 3465976 by Arne.Schober DR - [UE-44393] - The Canvas is using the Globalshaders for clearing but compilation is done asynconously at load time. Unfortunately there could be Code that uses a canvas to draw and cause this issue in between. There might be some plugins that do this. For now we need to wait and block for the shaqders to be compiled until we can allo the use of the canvas. #RB none Change 3467513 by Guillaume.Abadie Fixes an issue where primitives would no longer draw in gameplay. #jira UE-45550 Change 3471116 by Richard.Wallis Mac OpenGL Is No Longer Supported - Remove All Code & Shader Platforms. Merge of CL 3327784 dev-editor stream from Michael Trepka with some extra changes. - Also removed Metal shader platforms from PlatformSupportsDebugViewShaders() otherwise we get a compiler error. HLSL register binds not implemented in metal backend. #jira UE-39108 Change 3471117 by Richard.Wallis Drop down menus clip on 27" Screen iMacs. Disable viewport HDR rendering on macOS 10.12.x when in editor. #jira UE-43026 Change 3471130 by Richard.Wallis Mac GPU hang causes editor output log to be written to the wrong file. Try to emulate windows behaviour when opening a file for reading or writing. Tested against behaviour of windows log file with multiple instances running. - Only defined in for Mac and non shipping. #jira UE-44934 Change 3471224 by Guillaume.Abadie Lets the ProjectFileGenerator to look at Shaders/ directories in plugin and game projects. Change 3471646 by Daniel.Wright Fixed ensure opening UT system settings Change 3471862 by Arne.Schober DR - revert accidently checked in changes. #RB Chris.Bunner Change 3472249 by Guillaume.Abadie Implements virtual shader source directory mapping. - /Engine/... maps to Engine/Shaders/... - /Plugin/FooBar/... maps to FooBar plugin's Shaders/ directory - /Project/... maps to project's Shaders/ directory Change 3472443 by Daniel.Wright Moved the Rendering category for lights to be just below the Light category, so the bVisible property is easily accessible Change 3474537 by Uriel.Doyon Fixed lighting needs rebuild happening after blueprint rescript and a non symetrical Quaterion != ToQuaternion(ToRotator(Quaternion) Change3475192by Guillaume.Abadie Implements LensDistortion engine plugin. This CL import a polished version of Raven's lens distortion and undistortion from OpenCV parameters: - It is implemented as the first engine plugin with its own shaders and render thread commands; - Has feature tests in EngineTest with gold images directly extracted from OpenCV itself (GenerateLensDistortionUndistortReferences.py) Change 3475209 by Guillaume.Abadie Back out changelist3475192Change 3475252 by Guillaume.Abadie Reland: Implements LensDistortion engine plugin. This CL import a polished version of Raven's lens distortion and undistortion from OpenCV parameters: - It is implemented as the first engine plugin with its own shaders and render thread commands; - Has feature tests in EngineTest with gold images directly extracted from OpenCV itself (GenerateLensDistortionUndistortReferences.py) Change 3475389 by Guillaume.Abadie Adds LensDistortion plugin's feature tests. Change 3475538 by Guillaume.Abadie Adds the /Engine/* prefix on all of the renderer's USF file references. Change 3475568 by Guillaume.Abadie Adds a check for virtual shader source file path format in FShaderType::FShaderType() Change 3475871 by Guillaume.Abadie Fixes a bug in shader compile worker, were an error in a relative #include USF file would trigger an check failure in CheckVirtualShaderFilePath Change 3475997 by Yujiang.Wang Workaround for a compiler optimization bug introduced in VS2015 Update 3. * The bug causes TSHVector<2>::CalcDiffuseTransfer to go to infinity at certain spot, making movable objects with ILCQ_Volume indirect lighting cache interpolation get very dark. * Debug builds don't exhibit this bug. * Semantics are exactly the same as the original code. Change 3476203 by David.Hill Compute SSAO: problem wiht AmbientOcclusionLevels and with various viewporttest sizes. Only seen when Levels >=2 #jira UE-45741 Change 3476536 by Benjamin.Hyder adding player start to Ray Traced Distance Field Shadows Map Change 3478298 by Benjamin.Hyder disabling mesh distance fields in Tm-Raytraced_DistanceField_Shadows map Change 3478948 by Rolando.Caloca DR - Nicer check Change 3478949 by Rolando.Caloca DR - Default GPU morphs to enabled Change 3478950 by Rolando.Caloca DR - By default -vulkan will launch SM5 Change 3478984 by Rolando.Caloca DR - Pass down -vulkan Change 3479655 by Richard.Wallis Video track does not switch in AVF Media Player. Need to disable unused video tracks to allow AVPlayerItemVideoOutput to decode the required track. - Minimal change to allow video track changes/selection. - Audio samples are extracted using AVAssetReaderTrackOutput but video uses AVPlayerItemVideoOutput. Video could also use AVAssetReaderTrackOutput to access the video data unless there is an iOS reason not to... - Flush the audio sink sample buffers so we get instant audio track changes #jira UE-39750, UE-39749 Change 3479834 by Rolando.Caloca DR - Fix issue with bad vertex colors (per licensee) Change 3480376 by Guillaume.Abadie Disables ComputeLightGrid() if no volumetric fog and no lighting. #jira UE-45377 Change 3480596 by Yujiang.Wang Fix for dynamic shadows and raytraced distance field shadows of directional lights not appearing in planar reflection * Bug caused by incorrect shadow culling volumes for cascaded shadow map and backface culling mode for WholeSceneShadowProjection * Fixed by taking View.bReverseCulling into account #jira UE-34452 Change 3480600 by Yujiang.Wang Fix for UE-42376 * The bug is caused by post-processing ambient cubemaps not being supported in forward shading currently. * This fix replaces all the occurences of them in CalcSceneView with a skylight using the cubemap * If a CalcSceneView is used solely for setting the PP ambient cubemap, it is removed. #jira UE-42376 Change 3480784 by Rolando.Caloca DR - hlslcc - Initial support for [RW]StructuredBuffer Change 3481690 by Uriel.Doyon Attempt to fix static analysis warning Change 3482012 by Simon.Tovey Fixed issue when building distribution lookup tables where the final sample fell short of the max input time. As sampling is done only over this range, under constant interpolation the final value was never actually sampled and so cut from the final optimized LUT. #tests constant interpolation now works. #jira UE-45614 Change 3482965 by Yujiang.Wang Some quality of life changes for UE-42757 * The UV overlay in static mesh editor now has a darker background * Selected edges are getting highlighted and bolder * When some edges are selected others turn grey #jira UE-42757 Change 3483014 by David.Hill Change labels on bloom boost from x,y,z to min, max, mult. #jira UE-43904 a PropertyRedirect in BaseEngine.ini allows this to work with older version. Change 3484573 by Yujiang.Wang Fix for shadow color not updated after light build when a texture is changed and reimported * Bug caused by counter-intuitive design of UMaterial::GetReferencedFunctionIds and UMaterial::GetReferencedParameterCollectionIds, both of which will reset the OutIds parameter * Renamed to AppendReferencedFunctionIdsTo and AppendReferencedParameterCollectionIdsTo, the resets are removed #jira UE-45647 Change 3484969 by Yujiang.Wang Fix for UE-39929 inconsistent type between C++ and shader code * MeshDistanceFieldCasterIndices is declared as Buffer<uint> in CapsuleShadowShaders.usf, while created as PF_R32_SINT in CapsuleShadowRendering.cpp * Changed PF_R32_SINT to PF_R32_UINT in CapsuleShadowRendering.cpp #jira UE-39929 Change 3485012 by Yujiang.Wang Fix for UE-39929 #2: Changed int32 to uint32 to match PF_R32_UINT #jira UE-39929 Change 3485146 by Guillaume.Abadie Destroyes scene capture's view states on the UnRegister, to avoid large memory usage cause by the ViewState's render targets when moving blueprints arround. #jira UE-43455 Change 3486602 by Joe.Conley Adding "texcoord" keyword to UMaterialExpressionTextureCoordinate so you can search for the name that is displayed on the node in the graph. Change 3487471 by Yujiang.Wang Github #3659: Improved performance of DumpUnbuiltLightInteractions * Replaced TArrays with TSets #jira UE-45783 Change 3487641 by Guillaume.Abadie Fixes some shader file name casing issues in LPV. Change 3488014 by Uriel.Doyon New AllowAsyncLoading flag for UTexture::CachePlatformData(). It allows to load the source texture data in the async task if the source bulk data was not yet loaded. Data loaded that way is not sharable between tasks and will be discarded. This is required because updating the source data is not thread safe. #jira UERNDR-190 #jira UE-33401 Change 3488249 by Uriel.Doyon Fixed long stall in UpdateResourceStreaming() caused by Actor.GetComponents() not resetting the number of actors anymore. Fixed inconsistent results in ALODActor::HasValidSubActors() caused by the same change. #jira UE-46004 Change 3490228 by Mark.Satterthwaite Fix the Nvidia driver bug with the old reversebits fallback function - you need to use the native reverse_bits intrinsic or use some uint(ushort()) casts to get the compiler to do the right thing, which means injecting the reverse_bits function in MetalBackend not the HLSL (as it has no such type). #jira UE-46067 Change 3490538 by Arne.Schober Back out changelist 3488249 #RB none Change 3490551 by Arne.Schober Back out changelist 3488249 #RB none Change 3491828 by Guillaume.Abadie Fixes another USf file reference casing issue in C++. Change 3491924 by Yujiang.Wang Fix for UE-43302 Crash when entering the DebugCreatePlayer console command with planar reflections in the level * Crash caused by check(Views.Num() <= 2); in SceneCaptureRendering.cpp * We still want to support at most 2 views for performance, but now instead of crash the planar reflections in additional views will simply turn black #jira UE-43302 Change 3492359 by Guillaume.Abadie Fixes non editor launches, failing in FGenericPlatformProcess::AddShaderSourceDirectoryMapping(). Change 3492367 by Marc.Olano Change Sobol texture size to 32x16, tweak distribution Change 3492599 by Marcus.Wassmer PR #3669: -Fix logmessages ParticleModules_Location.cpp (Contributed by UpwindSpring01) Change 3493473 by Uriel.Doyon Back out changelist 3490538 Change 3493590 by Uriel.Doyon Back out changelist 3490551 Fixed missing #pragma once Change3493911by Marcus.Wassmer Fix potential GPU crash/hang caused by out of bound subresource updates. Added checks at cross-platform level to catch any instance earlier. Change 3494139 by Uriel.Doyon Fixed shadow variable issue on UE4Editor Linux. Change 3494364 by Richard.Wallis Mac OpenGL Is No Longer Supported - Remove All Code & Shader Platforms - Part 2: Remove some more areas and fixes for previous attempt. Also removed OpenGL based GPU performance checks in EditorEngine.cpp - assuming that any GPU that can run Metal is currently OK for UE4. OpenGL left in the following areas: - OpenGLShaderCompiler - StandaloneRenderer The following files need to be reviewed in conjunction with CL 3471116 as there were some logic errors made: - OpenGLTexture.cpp #jira UE-39108 Change 3494413 by Guillaume.Abadie Updates r.InvalidateCachedShader and bump ShaderVersion.ush. Change 3494422 by Guillaume.Abadie Adds LensDistortion plugin's Private shader directory. Change 3494717 by Guillaume.Abadie Strengthens shader compiler with checks on generated file names and shader type file names. Change 3494763 by Guillaume.Abadie Removes a nolonger standing TODO in GlobalBeginCompileShader() that was automatically adding /Engine/ prefix to all relative virtual shader source file path. Change 3494985 by Rolando.Caloca DR - Integrate Vulkan Rewrite Change 3495031 by Rolando.Caloca DR - Delete file as it moved Change 3495032 by Rolando.Caloca DR - Show Vulkan SM5 instead of SM4 on windows packaging - Also added support for Vulkan SM5_UB Change3495202by Uriel.Doyon Fixed static analysis warning with pointer dereferencing. Change 3495342 by Rolando.Caloca DR - clang compile fix Change 3495354 by Rolando.Caloca DR - clang compile fixes Change 3495420 by Marc.Olano Use Sobol sampling for PCSS Change 3495799 by Rolando.Caloca DR - Delete old dev assets Change 3496202 by Mark.Satterthwaite Switch to using actual Vector*Matrix intrinsic for Metal to avoid a problem whereby the Metal compiler reorders operations in such a way that it loses precision and ends up being different between pre-pass and base-pass. #jira UE-46070 Change 3496253 by Uriel.Doyon Fixed static analysis warning for IncludeTool Change 3496631 by Guillaume.Abadie Makes AScreenshotFunctionalTest::ScreenshotOptions blueprint readable. Change 3496851 by Guillaume.Abadie Fixes back slash issues in Platform.usf. Change 3496852 by Guillaume.Abadie Fixes other back slashes includes in PS4 specific usf files. Change 3496941 by Guillaume.Abadie Adds a check() for no backslash in virtual shader file paths. Change 3497661 by Guillaume.Abadie Lets FLensDistortionCameraModel::GetUndistortOverscanFactor() early return 1.0 if the camera model is does an identity transform. Change 3497969 by Richard.Wallis Fix for start Up Movies Are not Playing for iOS Devices. Handle case when movie is loading aysnc in background - need to wait for state changes otherwise it skips intermediate movies. - Tested on iOS and Mac. #jira UE-39585 Change 3498035 by Guillaume.Abadie Polishes //Engine/Plugins/Compositing/LensDistortion/Shaders/Private/UVGeneration.usf from debuging artifacts. Change 3498101 by Rolando.Caloca DR - Compile fix Change 3498254 by Guillaume.Abadie Exposes comparing FLensDistortionCameraModel to blueprint with == and != operator nodes for cross frame uv displacement map caching. Change 3498264 by Guillaume.Abadie Integrate 3267269: Implements SceneCaptureComponent2D::bCameraCutThisFrame Change 3498371 by Yujiang.Wang Fix for UE-46149 Planar Reflections display screenspace info when viewports are >2 * Prevent planar reflections being rendered when ViewIndex >= GMaxPlanarReflectionViews * Now planar reflections in >2 viewports will fallback to other reflection methods (SSR, reflection captures) #jira UE-46149 Change 3498409 by Rolando.Caloca DR - Swap resolves Change 3498410 by Guillaume.Abadie Adds support for opacity output alpha for post process material when doing a draw material to render target. Change 3498705 by Rolando.Caloca DR - Add UID for debugging mem allocations Change 3498759 by Marcus.Wassmer No post processing in vertexcolor view mode #jira UE-44704 Change 3498891 by Rolando.Caloca DR - Minor Vulkan per frame allocator refactor in prep for changes Change 3499206 by Rolando.Caloca DR - Fix temp frame allocator OOM on Vulkan #jira UE-45913 Change 3499319 by Rolando.Caloca DR - Vulkan support for StorageBuffer Change 3499339 by Rolando.Caloca DR - Remove deprecated typedef Change 3499400 by Rolando.Caloca DR - Remove some RHICmdList deprecated functions Change 3499422 by Rolando.Caloca DR - Allow buffer transitions inside render passes Change 3500370 by Rolando.Caloca DR - Compile fix Change 3500474 by Rolando.Caloca DR - Fix static analysis Change 3500517 by Guillaume.Abadie Exposes r.PostProcessing.PropagateAlpha to the renderer settings. Change 3500537 by Guillaume.Abadie Fixes a bug where scene capture WorldToView matrix would get scale != 1 when scaling the scene capture actor in the world. #jira UE-39389 Change 3501069 by Mark.Satterthwaite Bring back temporary 4.16 fix for iOS 9 (CL #3425995) into Dev-Rendering for 4.17 as a real fix will need to wait for 4.18. temporary fix for skewed textures on IOS 9 #jira UE-44468 Change 3501164 by Michael.Lentine PR #3402: UE-43131: Format argument count not equal to actual arguments (Contributed by projectgheist) Change 3501222 by Benjamin.Hyder Checking in Tm_SobolNoise map Change 3501612 by zachary.wilson Adding testing content for RTDF shadows on planar reflections Change 3501708 by Guillaume.Abadie Break FPostProcessSettings into smallers structs. Change 3501830 by Olaf.Piesche #jira UE-39628; using fix proposed in UDN, will investigate further Change 3501954 by Marcus.Wassmer Duplicate 3480903 Light culling safety measures. Change 3502032 by Mark.Satterthwaite Fix generation of Metal precompiled headers for the bytecode compiler when using Xcode 9. Change 3502118 by Uriel.Doyon Fixed shader compilation issues. Change 3502191 by Guillaume.Abadie Implements Composure plugin to make compositing in UE4 easier. Change 3502192 by Guillaume.Abadie Implements Composure feature testing in EngineTests Change 3502196 by Guillaume.Abadie Creates a dependency of Composure plugin over LensDistortion plugin. Change 3502213 by Arciel.Rekman Fix for loading shaders on Linux (UE-46276). Change 3502243 by Brian.Karis Bent normal map support. Multibounce AO. Spherical Gaussian based specular occlusion. Change 3502506 by Guillaume.Abadie Fixes compilation failure in Composure with unity build. Change 3502507 by Guillaume.Abadie Fixes composure Set Pass with Render Target blueprint helper. Change 3502510 by Guillaume.Abadie Attempts to fix ComposureUtils.cpp compile errors. Change 3502515 by Guillaume.Abadie Some other composure failure fixes. Change 3502545 by Guillaume.Abadie Fixes some unity build related error in Composure. Change 3502548 by Guillaume.Abadie Fixes last missing includes in ComposurePostProcessPass.cpp Change 3502672 by Guillaume.Abadie Fixes linux warning in Composure. Change 3502790 by Ryan.Brucks float4 PseudoVolumeTexture: Fixed frame layout being a float instead of float2. Now works correctly with non-square frame layouts. Only called in custom nodes and calling with a float still functions properly so no old content will break. Change 3502836 by Guillaume.Abadie Propagates scene capture engine showflag changes from blueprint editor to the blueprint instances. #jira UE-6810 Change 3503096 by Guillaume.Abadie Resave a unversioned asset. Change 3503228 by Yujiang.Wang Fix for UE-45646 Dynamic Light placed inside of a Dynamic Static Mesh doesn't pass through the geometry * Bug caused by bReflectiveShadowmap not being passed into SetViewFlagsForShadowPass * Replaced the true with bReflectiveShadowmap #jira UE-45646 Change 3503284 by Rolando.Caloca DR - Fixed initial clear on rendertargets - Added support for r.Vulkan.EnableValidation 1, 2, 3 & 4 - Dump the vulkan log into VS output log - Added validation for layouts when using dump log Change 3503545 by Arciel.Rekman Fix black UI on Linux (UE-46333) - Rebuilt hlslcc with clang 3.7.0. Whatever issues we're running in with newer clangs still seem to persist. #jira UE-46333 Change 3503638 by Daniel.Wright [Copy] Changed DynamicBentNormalAO back to fp16, as PF_FloatR11G11B10 was not enough precision and introduced banding Change 3503787 by Marcus.Wassmer Fix difference between gpu/cpu morph target application Change 3503902 by Marcus.Wassmer Roll back TAA refactor until we have time to look into the bad interaction with DOF. Change 3503953 by Arne.Schober DR - UE-46319 - borked Reflections: The resource transition needs to be in this weired place for PS4 and switch until we teach the interface to know about subresources. #RB Marcus.Wassmer Change 3504131 by Rolando.Caloca DR - Maintain a cache of pipeline and descriptor set layouts - Fix marker dump Change 3504462 by Guillaume.Abadie Fixes an assertion failure that was failing because compute light grid was not done, but the shader used where not necessarily using compute light grid results. #jira UE-46277 Change 3504779 by Chris.Bunner Potential static analysis fix. #jira UE-46360 Change 3504950 by Marc.Olano Allow Sobol material nodes & textures only if feature level is at least ES3.1 #jira UE-46334 #jira UE-46317 Change 3505035 by Daniel.Wright Increased MaxSearchCount in GetShaderIncludes. The previous limit of 20 is now getting hit in BasePassPixelShader.usf, causing compiles to fail erroneously. Change 3505386 by Daniel.Wright GetShaderIncludes handles infinite recursion gracefully, needed by Metal causing BasePassTessellation.usf to include BasePassVertexShader.usf Change 3505491 by Rolando.Caloca DR - Fix crash on first frame of particles on modern APIs Change 3505557 by Chris.Bunner [Duplicate] Workaround for outdated shader map crash. #jira UE-46061 Change 3506071 by Rolando.Caloca DR - Vulkan fixes - Fix copy out of bounds reading textures to CPU - Defer event deletion - Split validation for errors and warnings - Skip validation error about attachment not used Change 3506698 by Guillaume.Abadie Fixes Composure alpha channel clobering and performance regression in bloom and tonemapper passes caused by scene capture API compatibility breakage brought by Fortnite merge. Change 3506797 by Rolando.Caloca DR - Fix static analysis #jira UE-46428 Change 3506861 by Rolando.Caloca DR - Fix crash due to layering violation #jira UE-46424 #jira UE-46431 Change 3508098 by Rolando.Caloca DR - Fix for Vulkan ES31 crash - Fix for AMD ensure Change3508123by Rolando.Caloca DR - Disable occlusion queries on Vulkan to avoid flickering - Fix for bad HZB & cube mips on Vulkan (now using RHIGenerateMips) - Fix for decal blending #jira UE-46376 Change 3509064 by Uriel.Doyon Changing the logic arround generating an error when HasHadBulkDataCleared() so that it only triggers if the DDC are not found. #jira UE-46427 Change3509854by Marc.Olano Fix 2D Sobol gray code numbers. Just changes some numbers in initialization tables, so no effect on existing tests or content. Change 3509920 by Marcus.Wassmer Fix LPV fastvram ensure Change 3509937 by Rolando.Caloca DR - Fix crash due to deleted viewport #jira UE-46281 Change 3509988 by Marcus.Wassmer Roll back part of Sobol fix to avoid full shader recompile for integration. Change 3510255 by Rolando.Caloca DR - Fix popup window ensure #jira UE-46511 Change 3510646 by Marcus.Wassmer fix ios compiles Change 3511442 by Rolando.Caloca DR - Change mesh simplification check to ensure/checkslow to unblock #jira UE-46538 DONE! XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX CHANGES WITH MULTIPLE PLATFORMS!!! YOU MUST COPY THESE INTO THE OTHER ONES AS MAKES SENSE!! XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX Change 3467095 by Guillaume.Abadie Nukes all += TEXT(".usf") #jira UE-45530 Change 3475084 by Guillaume.Abadie Fixes compilation failure of the shader compiler on PS4 and XboxOne Change 3477464 by Guillaume.Abadie Fixes dumpshaderinfo that generate unecessary sub directory, breaking shell scripts. Change 3494395 by Guillaume.Abadie Moves all engine shader files into Public and Private directory, and introduce the .ush extensions for header file that do not contains entry points. DONE! [CL 3511602 by Marcus Wassmer in Main branch]
226 lines
5.7 KiB
C++
226 lines
5.7 KiB
C++
// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved.
|
|
//
|
|
|
|
#include "ShaderFormatOpenGL.h"
|
|
#include "HAL/FileManager.h"
|
|
#include "Modules/ModuleManager.h"
|
|
#include "Interfaces/IShaderFormat.h"
|
|
#include "Interfaces/IShaderFormatModule.h"
|
|
#include "ShaderCore.h"
|
|
|
|
static FName NAME_GLSL_150(TEXT("GLSL_150"));
|
|
static FName NAME_GLSL_430(TEXT("GLSL_430"));
|
|
static FName NAME_GLSL_ES2(TEXT("GLSL_ES2"));
|
|
static FName NAME_GLSL_ES2_WEBGL(TEXT("GLSL_ES2_WEBGL"));
|
|
static FName NAME_GLSL_150_ES2(TEXT("GLSL_150_ES2"));
|
|
static FName NAME_GLSL_150_ES2_NOUB(TEXT("GLSL_150_ES2_NOUB"));
|
|
static FName NAME_GLSL_150_ES3_1(TEXT("GLSL_150_ES31"));
|
|
static FName NAME_GLSL_ES2_IOS(TEXT("GLSL_ES2_IOS"));
|
|
static FName NAME_GLSL_310_ES_EXT(TEXT("GLSL_310_ES_EXT"));
|
|
static FName NAME_GLSL_ES3_1_ANDROID(TEXT("GLSL_ES3_1_ANDROID"));
|
|
|
|
class FShaderFormatGLSL : public IShaderFormat
|
|
{
|
|
enum
|
|
{
|
|
/** Version for shader format, this becomes part of the DDC key. */
|
|
UE_SHADER_GLSL_150_VER = 61,
|
|
UE_SHADER_GLSL_430_VER = 62,
|
|
UE_SHADER_GLSL_ES2_VER = 61,
|
|
UE_SHADER_GLSL_150ES2_VER = 61,
|
|
UE_SHADER_GLSL_150ES2NOUB_VER = 61,
|
|
UE_SHADER_GLSL_150ES3_1_VER = 61,
|
|
UE_SHADER_GLSL_ES2_VER_WEBGL = 61,
|
|
UE_SHADER_GLSL_ES2_IOS_VER = 61,
|
|
UE_SHADER_GLSL_310_ES_EXT_VER = 62,
|
|
UE_SHADER_GLSL_ES3_1_ANDROID_VER = 61,
|
|
};
|
|
|
|
void CheckFormat(FName Format) const
|
|
{
|
|
check( Format == NAME_GLSL_150 ||
|
|
Format == NAME_GLSL_430 ||
|
|
Format == NAME_GLSL_ES2 ||
|
|
Format == NAME_GLSL_150_ES2 ||
|
|
Format == NAME_GLSL_150_ES2_NOUB ||
|
|
Format == NAME_GLSL_150_ES3_1 ||
|
|
Format == NAME_GLSL_ES2_WEBGL ||
|
|
Format == NAME_GLSL_ES2_IOS ||
|
|
Format == NAME_GLSL_310_ES_EXT ||
|
|
Format == NAME_GLSL_ES3_1_ANDROID
|
|
);
|
|
}
|
|
|
|
public:
|
|
virtual uint16 GetVersion(FName Format) const override
|
|
{
|
|
CheckFormat(Format);
|
|
uint32 GLSLVersion = 0;
|
|
if (Format == NAME_GLSL_150)
|
|
{
|
|
GLSLVersion = UE_SHADER_GLSL_150_VER;
|
|
}
|
|
else if (Format == NAME_GLSL_430)
|
|
{
|
|
GLSLVersion = UE_SHADER_GLSL_430_VER;
|
|
}
|
|
else if (Format == NAME_GLSL_ES2)
|
|
{
|
|
GLSLVersion = UE_SHADER_GLSL_ES2_VER;
|
|
}
|
|
else if (Format == NAME_GLSL_150_ES2)
|
|
{
|
|
GLSLVersion = UE_SHADER_GLSL_150ES2_VER;
|
|
}
|
|
else if (Format == NAME_GLSL_150_ES3_1)
|
|
{
|
|
GLSLVersion = UE_SHADER_GLSL_150ES3_1_VER;
|
|
}
|
|
else if (Format == NAME_GLSL_150_ES2_NOUB)
|
|
{
|
|
GLSLVersion = UE_SHADER_GLSL_150ES2NOUB_VER;
|
|
}
|
|
else if (Format == NAME_GLSL_ES2_WEBGL)
|
|
{
|
|
GLSLVersion = UE_SHADER_GLSL_ES2_VER_WEBGL;
|
|
}
|
|
else if (Format == NAME_GLSL_ES2_IOS)
|
|
{
|
|
GLSLVersion = UE_SHADER_GLSL_ES2_IOS_VER;
|
|
}
|
|
else if (Format == NAME_GLSL_310_ES_EXT)
|
|
{
|
|
GLSLVersion = UE_SHADER_GLSL_310_ES_EXT_VER;
|
|
}
|
|
else if (Format == NAME_GLSL_ES3_1_ANDROID)
|
|
{
|
|
GLSLVersion = UE_SHADER_GLSL_ES3_1_ANDROID_VER;
|
|
}
|
|
else
|
|
{
|
|
check(0);
|
|
}
|
|
const uint16 Version = ((HLSLCC_VersionMinor & 0xff) << 8) | (GLSLVersion & 0xff);
|
|
return Version;
|
|
}
|
|
virtual void GetSupportedFormats(TArray<FName>& OutFormats) const override
|
|
{
|
|
OutFormats.Add(NAME_GLSL_150);
|
|
OutFormats.Add(NAME_GLSL_430);
|
|
OutFormats.Add(NAME_GLSL_ES2);
|
|
OutFormats.Add(NAME_GLSL_ES2_WEBGL);
|
|
OutFormats.Add(NAME_GLSL_150_ES2);
|
|
OutFormats.Add(NAME_GLSL_150_ES3_1);
|
|
OutFormats.Add(NAME_GLSL_ES2_IOS);
|
|
OutFormats.Add(NAME_GLSL_310_ES_EXT);
|
|
OutFormats.Add(NAME_GLSL_150_ES2_NOUB);
|
|
OutFormats.Add(NAME_GLSL_ES3_1_ANDROID);
|
|
}
|
|
|
|
static GLSLVersion TranslateFormatNameToEnum(FName Format)
|
|
{
|
|
if (Format == NAME_GLSL_150)
|
|
{
|
|
return GLSL_150;
|
|
}
|
|
else if (Format == NAME_GLSL_430)
|
|
{
|
|
return GLSL_430;
|
|
}
|
|
else if (Format == NAME_GLSL_ES2)
|
|
{
|
|
return GLSL_ES2;
|
|
}
|
|
else if (Format == NAME_GLSL_ES2_WEBGL )
|
|
{
|
|
return GLSL_ES2_WEBGL;
|
|
}
|
|
else if (Format == NAME_GLSL_ES2_IOS )
|
|
{
|
|
return GLSL_ES2_IOS;
|
|
}
|
|
else if (Format == NAME_GLSL_150_ES3_1)
|
|
{
|
|
return GLSL_150_ES3_1;
|
|
}
|
|
else if (Format == NAME_GLSL_150_ES2_NOUB)
|
|
{
|
|
return GLSL_150_ES2_NOUB;
|
|
}
|
|
else if (Format == NAME_GLSL_150_ES2)
|
|
{
|
|
return GLSL_150_ES2;
|
|
}
|
|
else if (Format == NAME_GLSL_310_ES_EXT)
|
|
{
|
|
return GLSL_310_ES_EXT;
|
|
}
|
|
else if (Format == NAME_GLSL_ES3_1_ANDROID)
|
|
{
|
|
return GLSL_ES3_1_ANDROID;
|
|
}
|
|
else
|
|
{
|
|
check(0);
|
|
return GLSL_MAX;
|
|
}
|
|
}
|
|
|
|
virtual void CompileShader(FName Format, const struct FShaderCompilerInput& Input, struct FShaderCompilerOutput& Output,const FString& WorkingDirectory) const override
|
|
{
|
|
CheckFormat(Format);
|
|
|
|
GLSLVersion Version = TranslateFormatNameToEnum(Format);
|
|
|
|
FOpenGLFrontend Frontend;
|
|
// the frontend will run the cross compiler
|
|
Frontend.CompileShader(Input, Output, WorkingDirectory, Version);
|
|
|
|
if (Version == GLSL_ES2 || Version == GLSL_150_ES2)
|
|
{
|
|
if (Input.DumpDebugInfoPath != TEXT("") && IFileManager::Get().DirectoryExists(*Input.DumpDebugInfoPath))
|
|
{
|
|
FShaderCompilerInput ES2Input = Input;
|
|
ES2Input.DumpDebugInfoPath = ES2Input.DumpDebugInfoPath.Replace(
|
|
TEXT("GLSL_150_ES2"),
|
|
(Version == GLSL_ES2 ? TEXT("GLSL_ES2") : TEXT("GLSL_ES2_150")),
|
|
ESearchCase::CaseSensitive);
|
|
|
|
if (!IFileManager::Get().DirectoryExists(*ES2Input.DumpDebugInfoPath))
|
|
{
|
|
verifyf(IFileManager::Get().MakeDirectory(*ES2Input.DumpDebugInfoPath, true), TEXT("Failed to create directory for shader debug info '%s'"), *ES2Input.DumpDebugInfoPath);
|
|
}
|
|
|
|
FShaderCompilerOutput ES2Output;
|
|
Frontend.CompileShader(ES2Input, ES2Output, WorkingDirectory, GLSL_ES2);
|
|
}
|
|
}
|
|
}
|
|
};
|
|
|
|
/**
|
|
* Module for OpenGL shaders
|
|
*/
|
|
|
|
static IShaderFormat* Singleton = NULL;
|
|
|
|
class FShaderFormatOpenGLModule : public IShaderFormatModule
|
|
{
|
|
public:
|
|
virtual ~FShaderFormatOpenGLModule()
|
|
{
|
|
delete Singleton;
|
|
Singleton = NULL;
|
|
}
|
|
virtual IShaderFormat* GetShaderFormat()
|
|
{
|
|
if (!Singleton)
|
|
{
|
|
Singleton = new FShaderFormatGLSL();
|
|
}
|
|
return Singleton;
|
|
}
|
|
};
|
|
|
|
IMPLEMENT_MODULE( FShaderFormatOpenGLModule, ShaderFormatOpenGL);
|