Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
lever-3d
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OpenSource
lever-3d
Commits
d815bb67
Commit
d815bb67
authored
Oct 24, 2014
by
Eric Wait
Browse files
Options
Downloads
Patches
Plain Diff
Adjusted the alpha in the pixel shader
parent
07944a71
Branches
Branches containing commit
No related tags found
1 merge request
!1
Split Hull Bug Fix
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/c/Material.cpp
+8
-3
8 additions, 3 deletions
src/c/Material.cpp
with
8 additions
and
3 deletions
src/c/Material.cpp
+
8
−
3
View file @
d815bb67
...
...
@@ -308,7 +308,7 @@ void createStaticVolumeShaderText(std::string strChans)
shaderText
+=
"
\t\t
float intensity = g_txDiffuse[i].Sample( g_samLinear[i], input.TextureUV );
\n
"
;
shaderText
+=
"
\t\t
intensity = clamp(intensity,ranges[i][0],ranges[i][1]);
\n
"
;
shaderText
+=
"
\t\t
intensity = transferFunctions[i][0]*intensity*intensity+transferFunctions[i][1]*intensity+transferFunctions[i][2];
\n
"
;
shaderText
+=
"
\t\t
if (intensity < 0.2f || channelColor[i].a < 0.
2
f)
\n
"
;
shaderText
+=
"
\t\t
if (intensity < 0.2f || channelColor[i].a < 0.
01
f)
\n
"
;
shaderText
+=
"
\t\t
{
\n
"
;
shaderText
+=
"
\t\t\t
intensity = 0;
\n
"
;
shaderText
+=
"
\t\t
}
\n
"
;
...
...
@@ -334,14 +334,19 @@ void createStaticVolumeShaderText(std::string strChans)
shaderText
+=
"
\t
}
\n
"
;
shaderText
+=
"
\n
"
;
shaderText
+=
"
\t
float maxComponent = max(max(unlitComposite.r,unlitComposite.g),unlitComposite.b);
\n
"
;
shaderText
+=
"
\t
float maxAplha = max(max(alphaComposite.r,alphaComposite.g),alphaComposite.b);
\n
"
;
shaderText
+=
"
\t
if (maxComponent!=0)
\n
"
;
shaderText
+=
"
\t
{
\n
"
;
shaderText
+=
"
\t\t
output.color.rgb /= maxComponent;
\n
"
;
shaderText
+=
"
\t\t
output.color.rgb *= maxIntensity;
\n
"
;
shaderText
+=
"
\t
}
\n
"
;
shaderText
+=
"
\t
if (maxAplha!=0)
\n
"
;
shaderText
+=
"
\t
{
\n
"
;
shaderText
+=
"
\t\t
output.color.a = maxAplha;
\n
"
;
shaderText
+=
"
\t
}else{
\n
"
;
shaderText
+=
"
\t\t
output.color.a = 0;
\n
"
;
shaderText
+=
"
\t
}
\n
"
;
shaderText
+=
"
\n
"
;
//shaderText += "\toutput.color.a = maxIntensity;\n";
shaderText
+=
"
\t
output.color.a = max(max(alphaComposite.r,alphaComposite.g),alphaComposite.b);
\n
"
;
shaderText
+=
"
\n
"
;
shaderText
+=
"
\t
if(lightOn.y>0)
\n
"
;
shaderText
+=
"
\t
{
\n
"
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment