Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge Main branch #826

Merged
merged 283 commits into from
Jun 10, 2022
Merged
Changes from 1 commit
Commits
Show all changes
283 commits
Select commit Hold shift + click to select a range
60c6f80
Add color space (#543)
GuoLei1990 Oct 25, 2021
331ebc7
fix: opt code (#519)
yangfengzzz Oct 25, 2021
c8c355a
feat: modify physics-related class for editor (#547)
yangfengzzz Oct 25, 2021
6c9c39b
Merge branch 'main' of github.com:oasis-engine/engine
gz65555 Oct 25, 2021
82563c9
Merge main to dev/0.6 (#553)
GuoLei1990 Oct 26, 2021
f757f7f
fix(gl): fix gl error (#555)
singlecoder Oct 26, 2021
e8b3097
v0.5.7
GuoLei1990 Oct 26, 2021
259bd7f
fix: bump verison (#557)
zhuxudong Oct 28, 2021
4edd2ee
fix: shader error (#556)
zhuxudong Oct 28, 2021
73c7585
Merge branch 'main' of github.com:oasis-engine/engine
gz65555 Oct 28, 2021
a6d1f11
feat/add AnimatorState script for handle animatorState's lifecycle (#…
luzhuang Oct 29, 2021
0febd0a
fix: onEndRender trigger error
gz65555 Nov 3, 2021
d9832dd
Fix Call EndRender Error (#563)
gz65555 Nov 4, 2021
f571fe0
feat: support skybox with hdr(rgbe) format (#567)
zhuxudong Nov 8, 2021
5c0414e
fix: color space correction (#566)
zhuxudong Nov 8, 2021
adde3a2
fix: bump version (#568)
JujieX Nov 8, 2021
be224b3
feat: change clipTime to normalized as same as transitionTime for mo…
luzhuang Nov 9, 2021
b70ca9f
Update README.md
GuoLei1990 Nov 9, 2021
72761a6
Update README.md
GuoLei1990 Nov 9, 2021
aca8331
Update README.md
GuoLei1990 Nov 9, 2021
72ce686
feat: add method: addEvent overload (#559)
luzhuang Nov 9, 2021
b33681f
feat: support ambient-light replacement (#569)
zhuxudong Nov 9, 2021
3c1065a
Feat/ambient light adapter editor (#570)
zhuxudong Nov 9, 2021
9845181
feat: add getCurrentAnimatorState API and fix crossfade time (#565)
luzhuang Nov 10, 2021
9b695b0
fix: use alipay cdn for physx wasm (#571)
yangfengzzz Nov 10, 2021
00f74cd
add wasm file (#572)
yangfengzzz Nov 10, 2021
97be84a
Fix : the compatibility problem of IOS lower version (#573)
cptbtptpbcptdtptp Nov 10, 2021
b87b09f
Merge branch 'dev/0.6'
GuoLei1990 Nov 10, 2021
f986b98
Merge dev/0.6 branch (#574)
GuoLei1990 Nov 10, 2021
a5a77ce
Merge branch 'main' of github.com:oasis-engine/engine
GuoLei1990 Nov 10, 2021
8ced19e
v0.6.0-alpha.0
GuoLei1990 Nov 10, 2021
11690f3
refactor: fix physics package.json
GuoLei1990 Nov 10, 2021
056cc8d
refactor: fix physics package.json (#575)
GuoLei1990 Nov 10, 2021
7f9f533
Merge branch 'main' of github.com:oasis-engine/engine
GuoLei1990 Nov 10, 2021
9c1e648
v0.6.0-alpha.1
GuoLei1990 Nov 10, 2021
0d54a6f
feat: support env loader (#577)
zhuxudong Nov 11, 2021
18577dd
fix: fix physcis update time and dynamic collider update (#578)
yangfengzzz Nov 12, 2021
61c7c5d
Merge branch 'dev/0.6'
GuoLei1990 Nov 12, 2021
bac0857
feat: support env loader (#577) (#580)
GuoLei1990 Nov 12, 2021
55deb20
Feat/animator reset (#533)
luzhuang Nov 12, 2021
9c0b2db
Merge branch 'dev/0.6'
GuoLei1990 Nov 12, 2021
c9da58a
Merge latest dev/0.6 (#581)
GuoLei1990 Nov 12, 2021
f98a156
Merge branch 'main' of github.com:oasis-engine/engine
GuoLei1990 Nov 12, 2021
221743b
feat: adapter env (#582)
zhuxudong Nov 12, 2021
346b809
feat: add rgbm switch (#584)
zhuxudong Nov 12, 2021
6801e51
Merge branch 'main' of github.com:oasis-engine/engine
GuoLei1990 Nov 12, 2021
a8f3fda
Feat/animator reset (#583)
luzhuang Nov 12, 2021
ee9e5f3
Merge branch 'main' of github.com:oasis-engine/engine
GuoLei1990 Nov 12, 2021
58dcc25
Merge branch 'main' of github.com:oasis-engine/engine
gz65555 Nov 12, 2021
18a589f
fix: remove ms blob deprecated
gz65555 Nov 12, 2021
61cb5ca
build: update typescript version
gz65555 Nov 13, 2021
8957568
feat: update background mesh
gz65555 Nov 13, 2021
3b08300
refactor: add gc ignore
gz65555 Nov 15, 2021
32fdb20
Fix Background UV Error and Update TypeScript Version (#585)
gz65555 Nov 15, 2021
95005fb
Merge branch 'main' of github.com:oasis-engine/engine
GuoLei1990 Nov 15, 2021
a84eee3
v0.6.0-alpha.2
GuoLei1990 Nov 15, 2021
23f58d7
v0.6.0-alpha.3
GuoLei1990 Nov 15, 2021
9c75c80
fix: dependencies package version (#588)
GuoLei1990 Nov 16, 2021
dcfb6d9
Fix: the bug that inputmanager cannot be obtained (#589)
cptbtptpbcptdtptp Nov 16, 2021
c6f23a5
fix: package.json (#591)
yangfengzzz Nov 16, 2021
098d937
Merge branch 'main' of github.com:oasis-engine/engine
gz65555 Nov 17, 2021
6eb31a8
fix: the bug that inputmanager cannot be obtained (#592)
cptbtptpbcptdtptp Nov 17, 2021
2cb2a6c
v0.6.0
GuoLei1990 Nov 17, 2021
29b3280
v0.6.1
GuoLei1990 Nov 18, 2021
9ff2c26
Merge branch 'main' of github.com:oasis-engine/engine
gz65555 Nov 18, 2021
8b202fd
build: physics use oasis-engine dependency
gz65555 Nov 18, 2021
09d2fff
Change Dependency for Physics (#594)
gz65555 Nov 18, 2021
1950115
v0.6.2
GuoLei1990 Nov 18, 2021
d0465c4
Merge branch 'main' of github.com:oasis-engine/engine
gz65555 Nov 20, 2021
9073d5c
fix: use canvas as control precision (#601)
zhuxudong Nov 29, 2021
487aa7e
v0.6.3
GuoLei1990 Nov 29, 2021
7f6247f
fix: `worldToViewportPoint()` bug
GuoLei1990 Nov 29, 2021
664e1d6
fix: `worldToViewportPoint()` bug (#603)
GuoLei1990 Nov 29, 2021
1abb051
fix: `screenToViewportPoint()` bug
GuoLei1990 Nov 29, 2021
58c91b4
refactor: opt `viewportToWorldPoint` and `screenToWorldPoint`
GuoLei1990 Nov 29, 2021
c0eeb8e
fix: comments
GuoLei1990 Nov 29, 2021
e2ad46f
fix: opt code
GuoLei1990 Nov 29, 2021
1b130e8
Merge branch 'main' of github.com:oasis-engine/engine
GuoLei1990 Nov 29, 2021
c248b9f
refactor: opt code
GuoLei1990 Nov 29, 2021
81ad193
Merge branch 'main' of github.com:oasis-engine/engine
GuoLei1990 Nov 30, 2021
d2d9a84
refactor: opt code
GuoLei1990 Nov 30, 2021
4e3ad95
fix: raycast bug, global and local transform misused (#602)
yangfengzzz Nov 30, 2021
7d34dcc
fix: set trilinear filter mode by default (#610)
zhuxudong Dec 1, 2021
949813a
fix: add transparent channel (#611)
zhuxudong Dec 6, 2021
457f5a4
Merge branch 'main' of github.com:oasis-engine/engine
GuoLei1990 Dec 6, 2021
6d68052
fix: front face bug
GuoLei1990 Dec 6, 2021
2b888ca
refactor: fix code
GuoLei1990 Dec 6, 2021
5f40b70
optimization viewportToWorldPoint and screenToWorldPoint (#604)
GuoLei1990 Dec 6, 2021
4867e09
Merge branch 'main' of github.com:oasis-engine/engine into dev/asset-…
gz65555 Dec 7, 2021
65d4360
bump version
gz65555 Dec 7, 2021
5519ade
bump version
gz65555 Dec 7, 2021
bca0da7
feat: add register and reflection object
gz65555 Dec 7, 2021
2f82ba4
feat: add prefab parser
gz65555 Dec 7, 2021
844dc04
Merge branch 'main' of github.com:oasis-engine/engine
GuoLei1990 Dec 7, 2021
0e9423f
Merge branch 'main' of github.com:oasis-engine/engine
GuoLei1990 Dec 7, 2021
6cf4ec3
fix: front face bug
GuoLei1990 Dec 7, 2021
dbdae6b
Fix mesh render front face bug (#614)
GuoLei1990 Dec 7, 2021
4e58618
Merge branch 'main' of github.com:oasis-engine/engine
GuoLei1990 Dec 7, 2021
3be72b7
fix: viewportToWorldPoint and worldToViewportPoint bug (#615)
GuoLei1990 Dec 11, 2021
c8c35ab
Merge branch 'main' of github.com:oasis-engine/engine
GuoLei1990 Dec 29, 2021
6d48dab
fix: resourceManager has't destory all cache
gz65555 Dec 29, 2021
cc8f05f
Fix ResourceManager Has not Destoryed All Cache (#621)
gz65555 Dec 29, 2021
c46f7de
Update README.md
eyworldwide Dec 29, 2021
d4a1157
Merge branch 'main' of github.com:oasis-engine/engine
GuoLei1990 Dec 30, 2021
3cc38d5
v0.6.4
GuoLei1990 Dec 30, 2021
4230956
Fix asset destroy cache bug (#622)
GuoLei1990 Dec 30, 2021
0c86026
v0.6.5
GuoLei1990 Dec 30, 2021
1bda175
fix: cache promise is not clear
gz65555 Dec 31, 2021
270ccab
Merge branch 'main' of github.com:oasis-engine/engine
gz65555 Dec 31, 2021
8fe988b
Fix Loading Promise is not Clear (#623)
gz65555 Dec 31, 2021
ba163f6
fix: entity cache bug
GuoLei1990 Jan 4, 2022
7b2a501
refactor: add destroyed project
GuoLei1990 Jan 4, 2022
9f5d2e5
fix: entity cache bug (#627)
GuoLei1990 Jan 4, 2022
0c31635
Merge branch 'main' of github.com:oasis-engine/engine
GuoLei1990 Jan 4, 2022
8eb53dc
v0.6.6
GuoLei1990 Jan 4, 2022
2cf3571
refactor: delete deprecate code (#630)
GuoLei1990 Jan 13, 2022
32dc732
Merge branch 'dev/asset-file' of github.com:oasis-engine/engine into …
gz65555 Jan 13, 2022
08f61b1
Merge branch 'main' of github.com:oasis-engine/engine into dev/asset-…
gz65555 Feb 7, 2022
223a02a
bump version
gz65555 Feb 7, 2022
93b4595
feat: export prefabloader
gz65555 Feb 7, 2022
7248ba5
fix: dynamic explansion
gz65555 Feb 9, 2022
9a6ceef
feat: add mipmap generate warn
Feb 9, 2022
1c1eade
Merge branch 'main' of github.com:gz65555/engine-1
Feb 9, 2022
84f43d6
feat: add mipmap true
Feb 9, 2022
cce5ac4
feat: add pixel buffer
gz65555 Feb 10, 2022
7570967
Merge branch 'dev/asset-file' of github.com:oasis-engine/engine into …
gz65555 Feb 10, 2022
2eccca9
fix: normal attributer is need in unlit (#637)
zhuxudong Feb 17, 2022
b28c936
fix: physx bug (#651)
yangfengzzz Feb 17, 2022
55ce80f
v0.6.7
GuoLei1990 Feb 17, 2022
a704854
fix: get pixel buffer use mip level should right shift (#656)
gz65555 Mar 2, 2022
070e621
Update AnimatorState.ts (#657)
luzhuang Mar 2, 2022
ffe530c
Rename `ability` to `component`. (#608)
eyworldwide Mar 2, 2022
bec99aa
fix: resize max uniform vector count (#660)
zhuxudong Mar 2, 2022
1f621f1
Optimize the use of `Transform` API (#638)
GuoLei1990 Mar 2, 2022
339a4a5
fix(2d): can not update world position for sprite renderer when call …
singlecoder Mar 3, 2022
953995e
Merge latest main to dev/0.6 (#672)
GuoLei1990 Mar 3, 2022
bec1c8d
fix: trigger event update (#673)
yangfengzzz Mar 3, 2022
5140986
refactor: remove Promise.finally (#671)
Cleam Mar 3, 2022
cda1278
fix: ignore scale (#670)
cptbtptpbcptdtptp Mar 3, 2022
5de3857
fix: use linear color space in gltf (#674)
zhuxudong Mar 4, 2022
16baed7
Fix Background Draw (#675)
gz65555 Mar 4, 2022
1f9ef5f
Merge branch 'main' of github.com:oasis-engine/engine into dev/asset-…
gz65555 Mar 8, 2022
cdb474d
Fix transform bug (#678)
GuoLei1990 Mar 9, 2022
a31b7cf
Fix: ModelMesh._indicesChangeFlag (#685)
cptbtptpbcptdtptp Mar 9, 2022
5086d41
feat: non-trigger script and dynamic collider (#680)
yangfengzzz Mar 10, 2022
1eff3c2
fix: break texcoor to avoid `_vertexSlotChanged` error (#684)
zhuxudong Mar 10, 2022
89ad3eb
v0.6.8
GuoLei1990 Mar 14, 2022
9c042e6
fix: rotation not normalized bug (#693)
GuoLei1990 Mar 16, 2022
4146574
Offscreen canvas requires no input interaction. (#689)
cptbtptpbcptdtptp Mar 16, 2022
b940b04
fix: scene romove entity bug (#698)
GuoLei1990 Mar 21, 2022
6f3e202
feat: keyboardevent (#677)
cptbtptpbcptdtptp Mar 21, 2022
89f7517
fix: position is deleted from entity (#699)
zhuxudong Mar 22, 2022
37e4b14
feat: physics fix-time update (#700)
yangfengzzz Mar 22, 2022
1ea89ab
Optimize: Optimize the lookat function of transform. (#701)
cptbtptpbcptdtptp Mar 22, 2022
b211d66
fix: transoform `rotate` bug when `relativeToLocal` is true (#702)
GuoLei1990 Mar 22, 2022
afa176a
fix: wordRotationQuatenion bug (#703)
GuoLei1990 Mar 23, 2022
c0ea1a2
Feat:The first version of text system (#686)
singlecoder Mar 29, 2022
948fe27
fix: fix text renderer clone error (#716)
singlecoder Mar 30, 2022
21d0031
Optimization texture structure (#715)
GuoLei1990 Mar 31, 2022
2bd1918
fix: script destroy bug (#720)
GuoLei1990 Apr 1, 2022
f077f1b
fix: make free control not depend on scene (#724)
zhuxudong Apr 2, 2022
632c1f1
Feat: support multi-uv and occlusion texture coordinate (#683)
zhuxudong Apr 2, 2022
c0743bf
Optimization physics init (#722)
GuoLei1990 Apr 2, 2022
9f0b3d2
fix: physics update order and destroy method (#727)
yangfengzzz Apr 6, 2022
73b7004
Merge branch 'main' of github.com:gz65555/engine-1 into dev/asset-file
gz65555 Apr 7, 2022
2eed79e
feat: update engine version
gz65555 Apr 8, 2022
2ec450c
fix: physcis event remove when collider shape destroy (#738)
yangfengzzz Apr 14, 2022
051a24e
feat: add type watch
gz65555 Apr 16, 2022
33ea08d
feat: init all project
gz65555 Apr 16, 2022
a03f193
build: remove init oasis
gz65555 Apr 16, 2022
86383f8
Merge branch main of github.com:oasis-engine/engine
gz65555 Apr 17, 2022
1f7cbff
physics test (#742)
yangfengzzz Apr 19, 2022
ec7b32c
Fix RenderTaget type problem (#741)
GuoLei1990 Apr 19, 2022
baf16cb
Test: text system (#740)
singlecoder Apr 19, 2022
0a938c6
Fix unit test and compile bug (#746)
GuoLei1990 Apr 20, 2022
18e7bc7
test: test for text renderer (#745)
singlecoder Apr 20, 2022
a2f0584
FloatTexture version Blendshape (#737)
GuoLei1990 Apr 20, 2022
0ea563a
Opt ModelMesh code (#739)
GuoLei1990 Apr 20, 2022
c2e238e
refactor: opt code
GuoLei1990 Apr 20, 2022
b9478e3
refactor: opt code (#747)
GuoLei1990 Apr 20, 2022
c8781e6
refactor: use modelmesh encode buffer
gz65555 Apr 20, 2022
a0e66c5
Feat: support load hdr to cubemap in RGBM format and invert x axis (#…
zhuxudong Apr 21, 2022
390aed6
Feat: support pbr clearcoat (#669)
zhuxudong Apr 21, 2022
9112ca8
Merge branch 'dev/0.7' of github.com:oasis-engine/engine into dev/0.7
GuoLei1990 Apr 21, 2022
1f49f91
feat: animator play backwards (#730)
luzhuang Apr 22, 2022
e528ee3
fix: constrain min shininess to `1e-4` (#749)
susiwen8 Apr 22, 2022
94a6a75
Merge branch 'dev/0.7' of github.com:oasis-engine/engine into dev/0.7
GuoLei1990 Apr 22, 2022
470117a
Add a ts-ignore (#679)
eyworldwide Apr 22, 2022
4e28061
Merge branch 'main' into dev/0.7
GuoLei1990 Apr 22, 2022
a904314
refactor: fix code
GuoLei1990 Apr 22, 2022
2cf421b
refactor: opt code
GuoLei1990 Apr 22, 2022
f854ae8
Merge latest `main` to `dev/0.7` (#751)
GuoLei1990 Apr 22, 2022
81d8382
feat: update wasm version (#753)
yangfengzzz Apr 22, 2022
60c87aa
Merge branch 'dev/0.7' of github.com:oasis-engine/engine into dev/0.7
GuoLei1990 Apr 22, 2022
aa5a8f9
refactor:opt code
GuoLei1990 Apr 22, 2022
c0f1c80
Merge `dev/0.7` to `main` (#754)
GuoLei1990 Apr 22, 2022
96d66a5
v0.7.0-beta.1
GuoLei1990 Apr 22, 2022
07e74c7
Merge branch 'main' into dev/0.7
GuoLei1990 Apr 22, 2022
bf41dbd
Create release.yml
GuoLei1990 Apr 24, 2022
5d10a34
Update release.yml
GuoLei1990 Apr 24, 2022
9314d3a
Update release.yml
GuoLei1990 Apr 24, 2022
0c52e84
docs: update commit spec and change log config (#758)
GuoLei1990 Apr 25, 2022
515159b
Update release.yml
GuoLei1990 Apr 25, 2022
989abdc
fix(animation): animator play error when blendShape count is 1 (#761)
GuoLei1990 Apr 26, 2022
c222a15
fix: lite box collider scale bug (#759)
yangfengzzz Apr 26, 2022
96a1043
refactor: adapter to website (#764)
zhuxudong Apr 26, 2022
709d09b
types(background): add export for BackgroundTextureFillMode (#768)
singlecoder Apr 27, 2022
6400307
fix(primitive-mesh): fix normal error for capsule cap (#762)
singlecoder Apr 27, 2022
bb8504d
fix(shader): not normalize normal bug(#769)
zhuxudong Apr 27, 2022
36049c0
fix(input): Remove the onblur function register when the engine is de…
cptbtptpbcptdtptp Apr 28, 2022
0d1b2ef
Fix(Engine): destroy bug cause by `requestAnimationFrame`(#771)
cptbtptpbcptdtptp Apr 28, 2022
a2c728c
v0.7.0-beta.2
GuoLei1990 Apr 28, 2022
e514013
fix: fix the order of layerState when AnimatorStatePlayState.Finishe…
luzhuang Apr 29, 2022
fa94637
fix: specular anti aliasing value (#773)
zhuxudong Apr 29, 2022
6c8632d
v0.7.0-beta.3
GuoLei1990 Apr 29, 2022
f25588a
fix: adapter all variable in miniprogram-adapter (#777)
zhuxudong May 5, 2022
4e82285
fix: struct in shader must init value in alipay miniprogram (#775)
zhuxudong May 5, 2022
c1265bf
v0.7.0-beta.4
GuoLei1990 May 10, 2022
931cdcb
refactor: remove console
gz65555 May 11, 2022
fbcf770
refactor: add math serialize
gz65555 May 11, 2022
2c9f26e
refactor: add model mesh serialize
gz65555 May 11, 2022
20ac1df
refactor: add scene loader
gz65555 May 11, 2022
9d8af5f
refactor: delete schema parser
gz65555 May 11, 2022
2cf7a2b
refactor: add scene loader
gz65555 May 11, 2022
a15a1aa
refactor: add index
gz65555 May 11, 2022
cbc88f1
Merge branch 'main' of github.com:gz65555/engine-1 into dev/asset-file
gz65555 May 11, 2022
3b30aaa
Merge branch 'main' of github.com:oasis-engine/engine into dev/asset-…
gz65555 May 11, 2022
b95fda9
refactor: fix types error
gz65555 May 13, 2022
e77e62b
Merge branch 'dev/asset-file' of github.com:oasis-engine/engine into …
gz65555 May 13, 2022
8e5828c
Merge branch 'oasis-engine:main' into main
gz65555 May 16, 2022
fbc2b88
Update README.md
GuoLei1990 May 17, 2022
699f0c7
Update README.md
GuoLei1990 May 17, 2022
c9a0e24
Update README.md
GuoLei1990 May 19, 2022
ba1f1ca
Add component denpendent decorator (#796) (#807)
GuoLei1990 May 25, 2022
db46497
fix(Renderer): destroy crash when material is null (#808)
GuoLei1990 May 26, 2022
55f82a7
Improve BlendShape when use attribute mode (#804)
GuoLei1990 May 27, 2022
3ffc687
v0.7.0-beta.5
GuoLei1990 May 27, 2022
7e2c29d
Merge branch 'main' of github.com:gz65555/engine-1 into dev/asset-file
gz65555 May 30, 2022
08c1702
refactor: remove useless import
gz65555 May 31, 2022
99a5e6e
fix: fixed the bug of animator revert when blendWeight length exceeds…
luzhuang Jun 1, 2022
46293b8
v0.7.0-beta.6
GuoLei1990 Jun 1, 2022
2f50271
fix(text): fix horizontal and vertical alignment error (#772)
singlecoder Jun 2, 2022
a2688df
Fix crossFade bug when two AnimatorState use one AnimationClip (#766)
luzhuang Jun 8, 2022
05886ad
types: export `BoolUpdateFlag` type (#822)
GuoLei1990 Jun 10, 2022
173abcb
refactor: clear import (#825)
zhuxudong Jun 10, 2022
20cee08
Improve ShaderData Macro feature (#823)
GuoLei1990 Jun 10, 2022
6c5c576
feat: export animation type
gz65555 Jun 10, 2022
efd966b
Merge branch 'main' of github.com:oasis-engine/engine into dev/asset-…
gz65555 Jun 10, 2022
c0b3c11
refactor: bump version
gz65555 Jun 10, 2022
c2cf092
Merge branch 'dev/asset-file' of github.com:oasis-engine/engine into …
gz65555 Jun 10, 2022
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
Prev Previous commit
Next Next commit
fix: color space correction (#566)
* fix: color space correction
zhuxudong authored Nov 8, 2021
commit 5c0414e22c547de4ef9ba4eb760a8451b5475e1c
2 changes: 1 addition & 1 deletion packages/core/src/shader/ShaderUniform.ts
Original file line number Diff line number Diff line change
@@ -120,7 +120,7 @@ export class ShaderUniform {
Color.gammaToLinearSpace((<Color>value).r),
Color.gammaToLinearSpace((<Color>value).g),
Color.gammaToLinearSpace((<Color>value).b),
Color.gammaToLinearSpace((<Color>value).a)
(<Color>value).a
);
} else {
this._gl.uniform4f(
21 changes: 15 additions & 6 deletions packages/core/src/shaderlib/begin_mobile_frag.glsl
Original file line number Diff line number Diff line change
@@ -6,14 +6,20 @@


#ifdef O3_EMISSIVE_TEXTURE

emission *= texture2D(u_emissiveTexture, v_uv);
vec4 emissiveTextureColor = texture2D(u_emissiveTexture, v_uv);
#ifndef OASIS_COLORSPACE_GAMMA
emissiveTextureColor = gammaToLinear(emissiveTextureColor);
#endif
emission *= emissiveTextureColor;

#endif

#ifdef O3_DIFFUSE_TEXTURE

diffuse *= texture2D(u_diffuseTexture, v_uv);
vec4 diffuseTextureColor = texture2D(u_diffuseTexture, v_uv);
#ifndef OASIS_COLORSPACE_GAMMA
diffuseTextureColor = gammaToLinear(diffuseTextureColor);
#endif
diffuse *= diffuseTextureColor;

#endif

@@ -24,8 +30,11 @@
#endif

#ifdef O3_SPECULAR_TEXTURE

specular *= texture2D(u_specularTexture, v_uv);
vec4 specularTextureColor = texture2D(u_specularTexture, v_uv);
#ifndef OASIS_COLORSPACE_GAMMA
specularTextureColor = gammaToLinear(specularTextureColor);
#endif
specular *= specularTextureColor;

#endif

4 changes: 3 additions & 1 deletion packages/core/src/shaderlib/extra/blinn-phong.fs.glsl
Original file line number Diff line number Diff line change
@@ -12,7 +12,6 @@
#include <fog_share>
#include <normal_get>


void main() {

#include <begin_mobile_frag>
@@ -22,6 +21,9 @@ void main() {
gl_FragColor = emission + ambient + diffuse + specular;
gl_FragColor.a = diffuse.a;

#ifndef OASIS_COLORSPACE_GAMMA
gl_FragColor = linearToGamma(gl_FragColor);
#endif
#include <fog_frag>

}
12 changes: 11 additions & 1 deletion packages/core/src/shaderlib/extra/unlit.fs.glsl
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include <common>
#include <uv_share>
#include <fog_share>

@@ -12,7 +13,11 @@ void main() {
vec4 baseColor = u_baseColor;

#ifdef O3_BASE_TEXTURE
baseColor *= texture2D(u_baseTexture, v_uv);
vec4 textureColor = texture2D(u_baseTexture, v_uv);
#ifndef OASIS_COLORSPACE_GAMMA
textureColor = gammaToLinear(textureColor);
#endif
baseColor *= textureColor;
#endif

#ifdef ALPHA_CUTOFF
@@ -21,6 +26,11 @@ void main() {
}
#endif


#ifndef OASIS_COLORSPACE_GAMMA
baseColor = linearToGamma(baseColor);
#endif

gl_FragColor = baseColor;

#include <fog_frag>
2 changes: 1 addition & 1 deletion packages/core/src/shaderlib/pbr/ibl_frag_define.glsl
Original file line number Diff line number Diff line change
@@ -62,7 +62,7 @@ vec3 getLightProbeRadiance(GeometricContext geometry, float roughness, int maxMI

envMapColor.rgb = RGBMToLinear(envMapColor, 5.0).rgb;
#ifdef OASIS_COLORSPACE_GAMMA
envMapColor = linearTogamma(envMapColor);
envMapColor = linearToGamma(envMapColor);
#endif
return envMapColor.rgb * specularIntensity;

8 changes: 4 additions & 4 deletions packages/core/src/shaderlib/pbr/pbr_frag.glsl
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@ addTotalDirectRadiance(geometry, material, reflectedLight);
#ifdef O3_USE_SH
vec3 irradiance = getLightProbeIrradiance(u_env_sh, geometry.normal);
#ifdef OASIS_COLORSPACE_GAMMA
irradiance = linearTogamma(irradiance);
irradiance = linearToGamma(vec4(irradiance, 1.0)).rgb;
#endif
irradiance *= u_envMapLight.diffuseIntensity;
#else
@@ -50,8 +50,8 @@ vec3 totalRadiance = reflectedLight.directDiffuse +
reflectedLight.indirectSpecular +
emissiveRadiance;

vec4 tagetColor =vec4(totalRadiance, u_baseColor.a);
vec4 targetColor =vec4(totalRadiance, u_baseColor.a);
#ifndef OASIS_COLORSPACE_GAMMA
tagetColor = linearToGamma (tagetColor);
targetColor = linearToGamma(targetColor);
#endif
gl_FragColor = tagetColor;
gl_FragColor = targetColor;