Skip to content

Fix button Bake with Reflection Probe in custom mode #2525

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Nov 4, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions com.unity.render-pipelines.high-definition/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ The version number for this package has increased due to a version update of a r
- Fixed custom pass markers not recorded when render graph was enabled.
- Fixed exceptions when unchecking "Big Tile Prepass" on the frame settings with render-graph.
- Fixed an issue causing errors in GenerateMaxZ when opaque objects or decals are disabled.
- Fixed an issue with Bake button of Reflection Probe when in custom mode

### Changed
- Combined occlusion meshes into one to reduce draw calls and state changes with XR single-pass.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,12 @@ public static Texture CreateRenderTargetForMode(HDProbe probe, ProbeSettings.Mod
Texture target = null;
var hd = (HDRenderPipeline)RenderPipelineManager.currentPipeline;
var settings = probe.settings;
var format = (GraphicsFormat)hd.currentPlatformRenderPipelineSettings.lightLoopSettings.reflectionProbeFormat;
switch (targetMode)
{
case ProbeSettings.Mode.Realtime:
{
var format = (GraphicsFormat)hd.currentPlatformRenderPipelineSettings.lightLoopSettings.reflectionProbeFormat;

switch (settings.type)
{
case ProbeSettings.ProbeType.PlanarProbe:
Expand All @@ -111,6 +112,9 @@ public static Texture CreateRenderTargetForMode(HDProbe probe, ProbeSettings.Mod
case ProbeSettings.Mode.Baked:
case ProbeSettings.Mode.Custom:
{
// Custom and Baked texture only support float16 for now
var format = GraphicsFormat.R16G16B16A16_SFloat;

switch (settings.type)
{
case ProbeSettings.ProbeType.PlanarProbe:
Expand Down