Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Molstar
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Michal Malý
Molstar
Commits
a025d5ba
Commit
a025d5ba
authored
6 years ago
by
Alexander Rose
Browse files
Options
Downloads
Patches
Plain Diff
webgl 1.0 compat and cleanup
parent
3a5a12af
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/mol-gl/shader/chunks/assign-material-color.glsl
+1
-2
1 addition, 2 deletions
src/mol-gl/shader/chunks/assign-material-color.glsl
src/mol-gl/shader/chunks/common.glsl
+0
-8
0 additions, 8 deletions
src/mol-gl/shader/chunks/common.glsl
src/mol-repr/visual.ts
+0
-1
0 additions, 1 deletion
src/mol-repr/visual.ts
with
1 addition
and
11 deletions
src/mol-gl/shader/chunks/assign-material-color.glsl
+
1
−
2
View file @
a025d5ba
...
@@ -17,14 +17,13 @@
...
@@ -17,14 +17,13 @@
float
at
=
0
.
0
;
float
at
=
0
.
0
;
#if defined(dTransparencyVariant_single)
#if defined(dTransparencyVariant_single)
ivec2
pixelCoord
=
ivec2
(
gl_FragCoord
.
xy
);
const
mat4
thresholdMatrix
=
mat4
(
const
mat4
thresholdMatrix
=
mat4
(
1
.
0
/
17
.
0
,
9
.
0
/
17
.
0
,
3
.
0
/
17
.
0
,
11
.
0
/
17
.
0
,
1
.
0
/
17
.
0
,
9
.
0
/
17
.
0
,
3
.
0
/
17
.
0
,
11
.
0
/
17
.
0
,
13
.
0
/
17
.
0
,
5
.
0
/
17
.
0
,
15
.
0
/
17
.
0
,
7
.
0
/
17
.
0
,
13
.
0
/
17
.
0
,
5
.
0
/
17
.
0
,
15
.
0
/
17
.
0
,
7
.
0
/
17
.
0
,
4
.
0
/
17
.
0
,
12
.
0
/
17
.
0
,
2
.
0
/
17
.
0
,
10
.
0
/
17
.
0
,
4
.
0
/
17
.
0
,
12
.
0
/
17
.
0
,
2
.
0
/
17
.
0
,
10
.
0
/
17
.
0
,
16
.
0
/
17
.
0
,
8
.
0
/
17
.
0
,
14
.
0
/
17
.
0
,
6
.
0
/
17
.
0
16
.
0
/
17
.
0
,
8
.
0
/
17
.
0
,
14
.
0
/
17
.
0
,
6
.
0
/
17
.
0
);
);
at
=
thresholdMatrix
[
pixelCoord
.
x
%
4
][
pixelCoord
.
y
%
4
];
at
=
thresholdMatrix
[
int
(
intMod
(
gl_FragCoord
.
x
,
4
.
0
))][
int
(
intMod
(
gl_FragCoord
.
y
,
4
.
0
))
];
#elif defined(dTransparencyVariant_multi)
#elif defined(dTransparencyVariant_multi)
at
=
fract
(
dot
(
vec3
(
gl_FragCoord
.
xy
,
vGroup
+
0
.
5
),
vec3
(
2
.
0
,
7
.
0
,
23
.
0
)
/
17
.
0
f
));
at
=
fract
(
dot
(
vec3
(
gl_FragCoord
.
xy
,
vGroup
+
0
.
5
),
vec3
(
2
.
0
,
7
.
0
,
23
.
0
)
/
17
.
0
f
));
#endif
#endif
...
...
This diff is collapsed.
Click to expand it.
src/mol-gl/shader/chunks/common.glsl
+
0
−
8
View file @
a025d5ba
float
intDiv
(
float
a
,
float
b
)
{
return
float
(
int
(
a
)
/
int
(
b
));
}
float
intDiv
(
float
a
,
float
b
)
{
return
float
(
int
(
a
)
/
int
(
b
));
}
float
intMod
(
float
a
,
float
b
)
{
return
a
-
b
*
float
(
int
(
a
)
/
int
(
b
));
}
float
intMod
(
float
a
,
float
b
)
{
return
a
-
b
*
float
(
int
(
a
)
/
int
(
b
));
}
float
hash2d
(
vec2
coord2d
)
{
return
fract
(
1.0e4
*
sin
(
17
.
0
*
coord2d
.
x
+
0
.
1
*
coord2d
.
y
)
*
(
0
.
1
+
abs
(
sin
(
13
.
0
*
coord2d
.
y
+
coord2d
.
x
))));
}
float
hash3d
(
vec3
coord3d
)
{
return
hash2d
(
vec2
(
hash2d
(
coord3d
.
xy
),
coord3d
.
z
));
}
#if __VERSION__ != 300
#if __VERSION__ != 300
// transpose
// transpose
...
...
This diff is collapsed.
Click to expand it.
src/mol-repr/visual.ts
+
0
−
1
View file @
a025d5ba
...
@@ -97,7 +97,6 @@ namespace Visual {
...
@@ -97,7 +97,6 @@ namespace Visual {
lociApply
(
loci
,
apply
)
lociApply
(
loci
,
apply
)
}
}
ValueCell
.
update
(
tOverpaint
,
tOverpaint
.
ref
.
value
)
ValueCell
.
update
(
tOverpaint
,
tOverpaint
.
ref
.
value
)
console
.
log
(
renderObject
)
}
}
export
function
setTransparency
(
renderObject
:
GraphicsRenderObject
|
undefined
,
transparency
:
Transparency
,
lociApply
:
LociApply
,
clear
:
boolean
)
{
export
function
setTransparency
(
renderObject
:
GraphicsRenderObject
|
undefined
,
transparency
:
Transparency
,
lociApply
:
LociApply
,
clear
:
boolean
)
{
...
...
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