Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

rewrite reactive UVOL #8848

Merged
merged 56 commits into from
Oct 30, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
8accee5
rewrite reactive UVOL1
CITIZENDOT Sep 19, 2023
3454e57
Merge branch 'dev' into uvol-rewrite
CITIZENDOT Sep 20, 2023
df8197e
Move worker to engine scope, refactor to use hooks, improve playlist …
CITIZENDOT Sep 21, 2023
f0ccaea
Autoplay/paused fixes
CITIZENDOT Sep 21, 2023
1bfb929
Merge branch 'dev' into uvol-rewrite
CITIZENDOT Sep 22, 2023
98e14a6
wip: init UniformUVOL
CITIZENDOT Sep 22, 2023
daaf6c9
fetch geometry segments and textures
CITIZENDOT Sep 22, 2023
8e69338
Merge branch 'dev' into uvol-rewrite
CITIZENDOT Sep 24, 2023
c5e8ece
unifying non-uniform and uniform component
CITIZENDOT Sep 27, 2023
4252daa
Merge branch 'dev' into uvol-rewrite
CITIZENDOT Sep 27, 2023
c41455b
Dispose attributes on GPU, track management
CITIZENDOT Sep 29, 2023
615af1f
clean up
CITIZENDOT Sep 29, 2023
2001af8
Merge branch 'dev' into uvol-rewrite
CITIZENDOT Sep 29, 2023
c713bce
Merge branch 'dev' into uvol-rewrite
CITIZENDOT Sep 30, 2023
cbc1e17
Update meshopt decoder module
CITIZENDOT Sep 30, 2023
33a3c90
UVOL1 readability
CITIZENDOT Oct 2, 2023
a3f9ec4
Merge branch 'dev' into uvol-rewrite
CITIZENDOT Oct 3, 2023
10e2a41
Loading effect for UVOL1
CITIZENDOT Oct 3, 2023
be057a7
Merge branch 'dev' into uvol-rewrite
CITIZENDOT Oct 4, 2023
1052746
Mirror media element paused
CITIZENDOT Oct 4, 2023
a1c55d8
Add explicit `autoplay` property
CITIZENDOT Oct 4, 2023
ce18329
Merge branch 'dev' into uvol-rewrite
CITIZENDOT Oct 4, 2023
324c5be
Merge branch 'dev' into uvol-rewrite
CITIZENDOT Oct 5, 2023
4cf57d1
Cleaned up pause/autoplay logic
CITIZENDOT Oct 5, 2023
18813d9
Merge branch 'dev' into uvol-rewrite
CITIZENDOT Oct 5, 2023
c5de937
Merge branch 'dev' into uvol-rewrite
CITIZENDOT Oct 6, 2023
9eef15e
Merge branch 'dev' into uvol-rewrite
CITIZENDOT Oct 6, 2023
45f02e2
minor correction to buffering logic
CITIZENDOT Oct 6, 2023
d3532cb
Implement consistent and reliable loading effect
CITIZENDOT Oct 7, 2023
1d6a1ef
Merge branch 'dev' into uvol-rewrite
CITIZENDOT Oct 7, 2023
18365de
revert AvatarDissolveComponent's changes
CITIZENDOT Oct 7, 2023
7135656
Merge branch 'dev' into uvol-rewrite
CITIZENDOT Oct 9, 2023
4d15342
Autotune targets
CITIZENDOT Oct 9, 2023
2d20d6d
Merge branch 'dev' into uvol-rewrite
CITIZENDOT Oct 11, 2023
d7ac919
Merge branch 'dev' into uvol-rewrite
CITIZENDOT Oct 12, 2023
18b17a0
disable shadows for uniform solve
CITIZENDOT Oct 12, 2023
90d9b9e
improve initial loading logic
CITIZENDOT Oct 16, 2023
9ed0122
Merge branch 'dev' into uvol-rewrite
CITIZENDOT Oct 16, 2023
e25c4e4
improve blending keyframes
CITIZENDOT Oct 16, 2023
7445769
Improve setAttribute
CITIZENDOT Oct 17, 2023
4dba4e9
Dont play when sufficient buffers not loaded yet
CITIZENDOT Oct 17, 2023
5bbd604
Improve performance
CITIZENDOT Oct 18, 2023
61106ee
Move CORTOLoader to AssetLoaderState
CITIZENDOT Oct 20, 2023
d96a7f4
Merge branch 'dev' into uvol-rewrite
CITIZENDOT Oct 20, 2023
6a10e36
Merge branch 'dev' into uvol-rewrite
CITIZENDOT Oct 24, 2023
55f7868
Merge branch 'dev' into uvol-rewrite
CITIZENDOT Oct 25, 2023
5641523
Merge branch 'dev' into uvol-rewrite
CITIZENDOT Oct 26, 2023
8615dcc
Update shader to r157
CITIZENDOT Oct 26, 2023
055f4ca
Merge branch 'dev' into uvol-rewrite
CITIZENDOT Oct 27, 2023
b3df1ff
Merge branch 'dev' into uvol-rewrite
CITIZENDOT Oct 27, 2023
36afec5
Merge branch 'dev' into uvol-rewrite
speigg Oct 27, 2023
36efe6b
Merge branch 'uvol-rewrite' of github.com:EtherealEngine/etherealengi…
CITIZENDOT Oct 28, 2023
b126b6c
Merge branch 'dev' into uvol-rewrite
CITIZENDOT Oct 28, 2023
bd6d7af
Start UVOL2 at non-zero time
CITIZENDOT Oct 28, 2023
894404f
Support different segment sizes across targets
CITIZENDOT Oct 30, 2023
b7e7cfd
Merge branch 'dev' into uvol-rewrite
CITIZENDOT Oct 30, 2023
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
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ import { useEffect } from 'react'

import {
defineComponent,
hasComponent,
setComponent,
useComponent,
useOptionalComponent
} from '@etherealengine/engine/src/ecs/functions/ComponentFunctions'
Expand All @@ -38,7 +36,7 @@ import { PositionalAudioHelper } from '../../debug/PositionalAudioHelper'
import { useEntityContext } from '../../ecs/functions/EntityFunctions'
import { RendererState } from '../../renderer/RendererState'
import { addObjectToGroup, removeObjectFromGroup } from '../../scene/components/GroupComponent'
import { AudioNodeGroups, MediaComponent, MediaElementComponent } from '../../scene/components/MediaComponent'
import { AudioNodeGroups, MediaElementComponent } from '../../scene/components/MediaComponent'
import { ObjectLayers } from '../../scene/constants/ObjectLayers'
import { setObjectLayers } from '../../scene/functions/setObjectLayers'

Expand Down Expand Up @@ -110,11 +108,6 @@ export const PositionalAudioComponent = defineComponent({
const debugEnabled = useHookstate(getMutableState(RendererState).nodeHelperVisibility)
const audio = useComponent(entity, PositionalAudioComponent)
const mediaElement = useOptionalComponent(entity, MediaElementComponent)
useEffect(() => {
if (hasComponent(entity, MediaComponent)) return

setComponent(entity, MediaComponent, {})
}, [])

useEffect(() => {
if (
Expand Down
28 changes: 2 additions & 26 deletions packages/engine/src/audio/systems/MediaSystem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import { EngineRenderer } from '../../renderer/WebGLRendererSystem'
import { StandardCallbacks, setCallback } from '../../scene/components/CallbackComponent'
import { MediaComponent } from '../../scene/components/MediaComponent'
import { VideoComponent, VideoTexturePriorityQueueState } from '../../scene/components/VideoComponent'
import { VolumetricComponent, endLoadingEffect } from '../../scene/components/VolumetricComponent'
// import { VolumetricComponent } from '../../scene/components/VolumetricComponent'
import { AudioSettingReceptor, AudioState } from '../AudioState'
import { PositionalAudioComponent } from '../components/PositionalAudioComponent'

Expand Down Expand Up @@ -102,7 +102,7 @@ globalThis.AudioEffectPlayer = AudioEffectPlayer

const mediaQuery = defineQuery([MediaComponent])
const videoQuery = defineQuery([VideoComponent])
const volumetricQuery = defineQuery([VolumetricComponent])
// const volumetricQuery = defineQuery([VolumetricComponent])
const audioQuery = defineQuery([PositionalAudioComponent])

const execute = () => {
Expand All @@ -112,30 +112,6 @@ const execute = () => {
setCallback(entity, StandardCallbacks.PAUSE, () => media.paused.set(true))
}

for (const entity of volumetricQuery()) {
const volumetric = getComponent(entity, VolumetricComponent)
const player = volumetric.player
if (player) {
player.update()
const height = volumetric.height
const step = volumetric.height / 150
if (volumetric.loadingEffectActive && player.mesh) {
if (volumetric.loadingEffectTime <= height) {
player.mesh.traverse((child: any) => {
if (child['material']) {
if (child.material.uniforms) {
child.material.uniforms.time = volumetric.loadingEffectTime
}
}
})
volumetric.loadingEffectTime += step
} else {
volumetric.loadingEffectActive = false
endLoadingEffect(entity, player.mesh)
}
}
}
}
for (const entity of audioQuery()) getComponent(entity, PositionalAudioComponent).helper?.update()

const videoPriorityQueue = getState(VideoTexturePriorityQueueState).queue
Expand Down
Loading
Loading