Comments (7)
I ran into this problem too. It doesn't seem possible for the filter to have ever worked before outside of Flash. As of OpenFL 6.0.1, the line
"rcp ft1.z, ft1.z \n" + // screenZ = -n*f/(d-f)
inFilter3DVDepthOfFFieldTask.hx
and Filter3DHDepthOfFFieldTask.hx
is translated to
ft1.z = vec4(1) / ft1.z; // rcp
There appears to be an attempt at getting it fixed on openfl/openfl#1613 but it still doesn't work since vect4
is there. I'm not familiar with shaders but based on the translated AGAL rcp
instruction, we can just change it to a div
instruction to workaround the problem. Since we just want to divide 1/z
and luckily it passes 1.0
as a constant in the program data array (in the 12 index as fc3.x
), we can substitute the rcp
line in the Task files as:
div ft1.z, fc3.x, ft1.z
Doing that change seems to compile without error. One more thing, there is a carryover bug away3d/away3d-core-fp11#566 in the ActionScript source where you must set range
in order for it to work. Otherwise it seems to be functional.
from away3d.
Thank you so much for your help!
I believe I have resolved the problem in our AGAL converter, as well as in Away3D (for the default depth value), but if you guys any further feedback or improvements, please send them our way 😀
from away3d.
Josh indicated this may be related to: openfl/openfl@03e9c77
from away3d.
Ah ok. But how to fix it?
from away3d.
Wow ...
from away3d.
@chfoo Is there a sensible default we could use in the depth filter, to avoid away3d/away3d-core-fp11#566, do you think?
from away3d.
The default value is fine, it's just that the original coder forgot to update the constructor in this commit: away3d/away3d-core-fp11@3474bab so _data[8]
is incorrect until you do something like filter.range = filter.range
.
from away3d.
Related Issues (20)
- 100$ Bounty. Android chrome bad depth sorting and glitches. HOT 2
- 100$ Bounty. Huge performance difference on html5 with multiple meshes and merged in a single mesh.
- Please publish a new version to Haxelib HOT 1
- Problem with MD2Parser HOT 4
- Add Missing MouseEvent3D Events
- View3D project bug in shareContext HOT 2
- Bug in OrthographicLens.hx HOT 1
- How to play animation in Dae format? HOT 9
- How to lower screen resolution on mobile to render app faster? HOT 4
- Parallax Mapping. Possible? HOT 2
- FBX support? HOT 2
- [HTML5] shared context with starling doesn't work, if starling contain masks HOT 1
- [HTML5] Stage resizing issues with shared context
- Object3D.pivotPoint (bug) HOT 1
- If _billboardAxis is not null in ParticleBillboardState, the display object will disappear.
- Memory leak: material.lightPicker
- `ParticleGeometryHelper` creates one particle per subgeometry. HOT 2
- lime test flash fails HOT 1
- Starling/Away3D interoperability is broken HOT 1
- error on view3D.dispose() (i now provided my code) HOT 12
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from away3d.