Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
VkCV Framework
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Vulkan2021
VkCV Framework
Commits
7deb24cc
Verified
Commit
7deb24cc
authored
3 years ago
by
Josch Morgenstern
Browse files
Options
Downloads
Patches
Plain Diff
[
#111
] change particle struct, remove lifetime
parent
eecd1cda
No related branches found
No related tags found
1 merge request
!95
Resolve "Wassersimulation mit Interaktion"
Pipeline
#27207
passed
3 years ago
Stage: build
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
projects/sph/shaders/shader.vert
+5
-6
5 additions, 6 deletions
projects/sph/shaders/shader.vert
with
5 additions
and
6 deletions
projects/sph/shaders/shader.vert
+
5
−
6
View file @
7deb24cc
...
@@ -6,11 +6,11 @@ layout(location = 0) in vec3 particle;
...
@@ -6,11 +6,11 @@ layout(location = 0) in vec3 particle;
struct
Particle
struct
Particle
{
{
vec3
position
;
vec3
position
;
float
lifeTime
;
float
padding
;
vec3
velocity
;
vec3
velocity
;
float
padding_2
;
float
density
;
vec3
reset_velocity
;
vec3
force
;
float
p
adding_3
;
float
p
ressure
;
};
};
layout
(
std430
,
binding
=
2
)
readonly
buffer
buffer_inParticle1
layout
(
std430
,
binding
=
2
)
readonly
buffer
buffer_inParticle1
...
@@ -30,13 +30,12 @@ layout( push_constant ) uniform constants{
...
@@ -30,13 +30,12 @@ layout( push_constant ) uniform constants{
layout
(
location
=
0
)
out
vec2
passTriangleCoordinates
;
layout
(
location
=
0
)
out
vec2
passTriangleCoordinates
;
layout
(
location
=
1
)
out
vec3
passVelocity
;
layout
(
location
=
1
)
out
vec3
passVelocity
;
layout
(
location
=
2
)
out
float
passlifeTime
;
void
main
()
void
main
()
{
{
int
id
=
gl_InstanceIndex
;
int
id
=
gl_InstanceIndex
;
passVelocity
=
inParticle1
[
id
].
velocity
;
passVelocity
=
inParticle1
[
id
].
velocity
;
passlifeTime
=
inParticle1
[
id
].
lifeTime
;
// particle position in view space
// particle position in view space
vec4
positionView
=
view
*
vec4
(
inParticle1
[
id
].
position
,
1
);
vec4
positionView
=
view
*
vec4
(
inParticle1
[
id
].
position
,
1
);
// by adding the triangle position in view space the mesh is always camera facing
// by adding the triangle position in view space the mesh is always camera facing
...
...
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