Skip to content
Snippets Groups Projects
Unverified Commit f16a1bf0 authored by David Parks's avatar David Parks Committed by GitHub
Browse files

Merge pull request #974 from secondlife/965-eep-skies-too-bright-after-hdri-local-preview-merge

965 eep skies too bright after hdri local preview merge
parents 5fca8915 457b720f
No related branches found
No related tags found
No related merge requests found
...@@ -42,8 +42,6 @@ jobs: ...@@ -42,8 +42,6 @@ jobs:
DEVELOPER_DIR: ${{ matrix.developer_dir }} DEVELOPER_DIR: ${{ matrix.developer_dir }}
# Ensure that Linden viewer builds engage Bugsplat. # Ensure that Linden viewer builds engage Bugsplat.
BUGSPLAT_DB: ${{ matrix.configuration != 'ReleaseOS' && 'SecondLife_Viewer_2018' || '' }} BUGSPLAT_DB: ${{ matrix.configuration != 'ReleaseOS' && 'SecondLife_Viewer_2018' || '' }}
BUGSPLAT_PASS: ${{ secrets.BUGSPLAT_PASS }}
BUGSPLAT_USER: ${{ secrets.BUGSPLAT_USER }}
build_coverity: false build_coverity: false
build_log_dir: ${{ github.workspace }}/.logs build_log_dir: ${{ github.workspace }}/.logs
build_viewer: true build_viewer: true
...@@ -262,23 +260,36 @@ jobs: ...@@ -262,23 +260,36 @@ jobs:
${{ steps.build.outputs.physicstpv }} ${{ steps.build.outputs.physicstpv }}
sign-and-package-windows: sign-and-package-windows:
env:
AZURE_KEY_VAULT_URI: ${{ secrets.AZURE_KEY_VAULT_URI }}
AZURE_CERT_NAME: ${{ secrets.AZURE_CERT_NAME }}
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
needs: build needs: build
runs-on: windows runs-on: windows
steps: steps:
- name: Sign and package Windows viewer - name: Sign and package Windows viewer
if: env.AZURE_KEY_VAULT_URI && env.AZURE_CERT_NAME && env.AZURE_CLIENT_ID && env.AZURE_CLIENT_SECRET && env.AZURE_TENANT_ID
uses: secondlife/viewer-build-util/sign-pkg-windows@v1 uses: secondlife/viewer-build-util/sign-pkg-windows@v1
with: with:
vault_uri: "${{ secrets.AZURE_KEY_VAULT_URI }}" vault_uri: "${{ env.AZURE_KEY_VAULT_URI }}"
cert_name: "${{ secrets.AZURE_CERT_NAME }}" cert_name: "${{ env.AZURE_CERT_NAME }}"
client_id: "${{ secrets.AZURE_CLIENT_ID }}" client_id: "${{ env.AZURE_CLIENT_ID }}"
client_secret: "${{ secrets.AZURE_CLIENT_SECRET }}" client_secret: "${{ env.AZURE_CLIENT_SECRET }}"
tenant_id: "${{ secrets.AZURE_TENANT_ID }}" tenant_id: "${{ env.AZURE_TENANT_ID }}"
sign-and-package-mac: sign-and-package-mac:
env:
NOTARIZE_CREDS_MACOS: ${{ secrets.NOTARIZE_CREDS_MACOS }}
SIGNING_CERT_MACOS: ${{ secrets.SIGNING_CERT_MACOS }}
SIGNING_CERT_MACOS_IDENTITY: ${{ secrets.SIGNING_CERT_MACOS_IDENTITY }}
SIGNING_CERT_MACOS_PASSWORD: ${{ secrets.SIGNING_CERT_MACOS_PASSWORD }}
needs: build needs: build
runs-on: macos-latest runs-on: macos-latest
steps: steps:
- name: Unpack Mac notarization credentials - name: Unpack Mac notarization credentials
if: env.NOTARIZE_CREDS_MACOS
id: note-creds id: note-creds
shell: bash shell: bash
run: | run: |
...@@ -286,7 +297,7 @@ jobs: ...@@ -286,7 +297,7 @@ jobs:
# USERNAME="..." # USERNAME="..."
# PASSWORD="..." # PASSWORD="..."
# TEAM_ID="..." # TEAM_ID="..."
eval "${{ secrets.NOTARIZE_CREDS_MACOS }}" eval "${{ env.NOTARIZE_CREDS_MACOS }}"
echo "::add-mask::$USERNAME" echo "::add-mask::$USERNAME"
echo "::add-mask::$PASSWORD" echo "::add-mask::$PASSWORD"
echo "::add-mask::$TEAM_ID" echo "::add-mask::$TEAM_ID"
...@@ -298,39 +309,48 @@ jobs: ...@@ -298,39 +309,48 @@ jobs:
[[ -n "$USERNAME" && -n "$PASSWORD" && -n "$TEAM_ID" ]] [[ -n "$USERNAME" && -n "$PASSWORD" && -n "$TEAM_ID" ]]
- name: Sign and package Mac viewer - name: Sign and package Mac viewer
if: env.SIGNING_CERT_MACOS && env.SIGNING_CERT_MACOS_IDENTITY && env.SIGNING_CERT_MACOS_PASSWORD && steps.note-creds.outputs.note_user && steps.note-creds.outputs.note_pass && steps.note-creds.outputs.note_team
uses: secondlife/viewer-build-util/sign-pkg-mac@v1 uses: secondlife/viewer-build-util/sign-pkg-mac@v1
with: with:
channel: ${{ needs.build.outputs.viewer_channel }} channel: ${{ needs.build.outputs.viewer_channel }}
imagename: ${{ needs.build.outputs.imagename }} imagename: ${{ needs.build.outputs.imagename }}
cert_base64: ${{ secrets.SIGNING_CERT_MACOS }} cert_base64: ${{ env.SIGNING_CERT_MACOS }}
cert_name: ${{ secrets.SIGNING_CERT_MACOS_IDENTITY }} cert_name: ${{ env.SIGNING_CERT_MACOS_IDENTITY }}
cert_pass: ${{ secrets.SIGNING_CERT_MACOS_PASSWORD }} cert_pass: ${{ env.SIGNING_CERT_MACOS_PASSWORD }}
note_user: ${{ steps.note-creds.outputs.note_user }} note_user: ${{ steps.note-creds.outputs.note_user }}
note_pass: ${{ steps.note-creds.outputs.note_pass }} note_pass: ${{ steps.note-creds.outputs.note_pass }}
note_team: ${{ steps.note-creds.outputs.note_team }} note_team: ${{ steps.note-creds.outputs.note_team }}
post-windows-symbols: post-windows-symbols:
env:
BUGSPLAT_USER: ${{ secrets.BUGSPLAT_USER }}
BUGSPLAT_PASS: ${{ secrets.BUGSPLAT_PASS }}
needs: build needs: build
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Post Windows symbols - name: Post Windows symbols
if: env.BUGSPLAT_USER && env.BUGSPLAT_PASS
uses: secondlife/viewer-build-util/post-bugsplat-windows@v1 uses: secondlife/viewer-build-util/post-bugsplat-windows@v1
with: with:
username: ${{ secrets.BUGSPLAT_USER }} username: ${{ env.BUGSPLAT_USER }}
password: ${{ secrets.BUGSPLAT_PASS }} password: ${{ env.BUGSPLAT_PASS }}
database: "SecondLife_Viewer_2018" database: "SecondLife_Viewer_2018"
channel: ${{ needs.build.outputs.viewer_channel }} channel: ${{ needs.build.outputs.viewer_channel }}
version: ${{ needs.build.outputs.viewer_version }} version: ${{ needs.build.outputs.viewer_version }}
post-mac-symbols: post-mac-symbols:
env:
BUGSPLAT_USER: ${{ secrets.BUGSPLAT_USER }}
BUGSPLAT_PASS: ${{ secrets.BUGSPLAT_PASS }}
needs: build needs: build
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Post Mac symbols - name: Post Mac symbols
if: env.BUGSPLAT_USER && env.BUGSPLAT_PASS
uses: secondlife/viewer-build-util/post-bugsplat-mac@v1 uses: secondlife/viewer-build-util/post-bugsplat-mac@v1
with: with:
username: ${{ secrets.BUGSPLAT_USER }} username: ${{ env.BUGSPLAT_USER }}
password: ${{ secrets.BUGSPLAT_PASS }} password: ${{ env.BUGSPLAT_PASS }}
database: "SecondLife_Viewer_2018" database: "SecondLife_Viewer_2018"
channel: ${{ needs.build.outputs.viewer_channel }} channel: ${{ needs.build.outputs.viewer_channel }}
version: ${{ needs.build.outputs.viewer_version }} version: ${{ needs.build.outputs.viewer_version }}
......
...@@ -17,7 +17,8 @@ jobs: ...@@ -17,7 +17,8 @@ jobs:
with: with:
stale-pr-message: This pull request is stale because it has been open 30 days with no activity. Remove stale label or comment or it will be closed in 7 days stale-pr-message: This pull request is stale because it has been open 30 days with no activity. Remove stale label or comment or it will be closed in 7 days
days-before-stale: 30 days-before-stale: 30
days-before-close: 7 days-before-close: 7
days-before-issue-close: -1
exempt-pr-labels: blocked,must,should,keep exempt-pr-labels: blocked,must,should,keep
stale-pr-label: stale stale-pr-label: stale
- name: Print outputs - name: Print outputs
......
...@@ -175,28 +175,6 @@ pre_build() ...@@ -175,28 +175,6 @@ pre_build()
VIEWER_SYMBOL_FILE="$(native_path "$abs_build_dir/newview/$variant/secondlife-symbols-$symplat-${AUTOBUILD_ADDRSIZE}.tar.bz2")" VIEWER_SYMBOL_FILE="$(native_path "$abs_build_dir/newview/$variant/secondlife-symbols-$symplat-${AUTOBUILD_ADDRSIZE}.tar.bz2")"
fi fi
# expect these variables to be set in the environment from GitHub secrets
if [[ -n "$BUGSPLAT_DB" ]]
then
# don't spew credentials into build log
set +x
if [[ -z "$BUGSPLAT_USER" || -z "$BUGSPLAT_PASS" ]]
then
# older mechanism involving build-secrets repo -
# if build_secrets_checkout isn't set, report its name
bugsplat_sh="${build_secrets_checkout:-\$build_secrets_checkout}/bugsplat/bugsplat.sh"
if [ -r "$bugsplat_sh" ]
then # show that we're doing this, just not the contents
echo source "$bugsplat_sh"
source "$bugsplat_sh"
else
fatal "BUGSPLAT_USER or BUGSPLAT_PASS missing, and no $bugsplat_sh"
fi
fi
set -x
export BUGSPLAT_USER BUGSPLAT_PASS
fi
# honor autobuild_configure_parameters same as sling-buildscripts # honor autobuild_configure_parameters same as sling-buildscripts
eval_autobuild_configure_parameters=$(eval $(echo echo $autobuild_configure_parameters)) eval_autobuild_configure_parameters=$(eval $(echo echo $autobuild_configure_parameters))
......
...@@ -86,7 +86,9 @@ void main() ...@@ -86,7 +86,9 @@ void main()
pos = env_mat * pos; pos = env_mat * pos;
vec2 texCoord = vec2(atan(pos.z, pos.x) + PI, acos(pos.y)) / vec2(2.0 * PI, PI); vec2 texCoord = vec2(atan(pos.z, pos.x) + PI, acos(pos.y)) / vec2(2.0 * PI, PI);
vec3 color = textureLod(environmentMap, texCoord.xy, 0).rgb * sky_hdr_scale; vec3 color = textureLod(environmentMap, texCoord.xy, 0).rgb * sky_hdr_scale;
color = min(color, vec3(8192*8192*16)); color = min(color, vec3(8192*8192*16)); // stupidly large value arrived at by binary search -- avoids framebuffer corruption from some HDRIs
frag_data[2] = vec4(0.0,0.0,0.0,GBUFFER_FLAG_HAS_HDRI);
#else #else
// Potential Fill-rate optimization. Add cloud calculation // Potential Fill-rate optimization. Add cloud calculation
...@@ -104,12 +106,11 @@ void main() ...@@ -104,12 +106,11 @@ void main()
color.rgb *= 2.; color.rgb *= 2.;
color.rgb = clamp(color.rgb, vec3(0), vec3(5)); color.rgb = clamp(color.rgb, vec3(0), vec3(5));
frag_data[2] = vec4(0.0,0.0,0.0,GBUFFER_FLAG_SKIP_ATMOS);
#endif #endif
frag_data[0] = vec4(0); frag_data[0] = vec4(0);
frag_data[1] = vec4(0); frag_data[1] = vec4(0);
frag_data[2] = vec4(0.0,0.0,0.0,GBUFFER_FLAG_SKIP_ATMOS);
frag_data[3] = vec4(color.rgb, 1.0); frag_data[3] = vec4(color.rgb, 1.0);
} }
...@@ -191,11 +191,12 @@ void main() ...@@ -191,11 +191,12 @@ void main()
} }
else if (GET_GBUFFER_FLAG(GBUFFER_FLAG_HAS_HDRI)) else if (GET_GBUFFER_FLAG(GBUFFER_FLAG_HAS_HDRI))
{ {
// actual HDRI sky, just copy color value
color = texture(emissiveRect, tc).rgb; color = texture(emissiveRect, tc).rgb;
} }
else if (!GET_GBUFFER_FLAG(GBUFFER_FLAG_HAS_ATMOS)) else if (GET_GBUFFER_FLAG(GBUFFER_FLAG_SKIP_ATMOS))
{ {
//should only be true of WL sky, just port over base color value //should only be true of WL sky, port over base color value and scale for fake HDR
color = texture(emissiveRect, tc).rgb; color = texture(emissiveRect, tc).rgb;
color = srgb_to_linear(color); color = srgb_to_linear(color);
color *= sky_hdr_scale; color *= sky_hdr_scale;
......
...@@ -470,8 +470,6 @@ void LLDrawPoolWLSky::renderDeferred(S32 pass) ...@@ -470,8 +470,6 @@ void LLDrawPoolWLSky::renderDeferred(S32 pass)
const F32 camHeightLocal = LLEnvironment::instance().getCamHeight(); const F32 camHeightLocal = LLEnvironment::instance().getCamHeight();
gGL.setColorMask(true, false);
LLVector3 const & origin = LLViewerCamera::getInstance()->getOrigin(); LLVector3 const & origin = LLViewerCamera::getInstance()->getOrigin();
if (gPipeline.canUseWindLightShaders()) if (gPipeline.canUseWindLightShaders())
...@@ -488,7 +486,6 @@ void LLDrawPoolWLSky::renderDeferred(S32 pass) ...@@ -488,7 +486,6 @@ void LLDrawPoolWLSky::renderDeferred(S32 pass)
renderSkyCloudsDeferred(origin, camHeightLocal, cloud_shader); renderSkyCloudsDeferred(origin, camHeightLocal, cloud_shader);
} }
} }
gGL.setColorMask(true, true);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment