markcwm / openb3d.docs Goto Github PK
View Code? Open in Web Editor NEWOpenB3D source code examples with media included
OpenB3D source code examples with media included
standard/lightmap.bmx
, load_3ds.bmx
and load_b3d.bmx
all import Koriolis.Zipstream
doesn't always use it.
(bonus: Strict
is declared after Framework
in a lot of examples, which is not okay in BmxNG)
I tried to start this example:
openb3d.docs/extended/stencil_shadows2.bmx
but on BlitzMax NG there is an error message:
Compile Error: Unable to find overload for positionentity(TLight,Double,Int,Int). Argument #2 is "Double" but declaration is "Float".
[C:/BasicNG/Spiegel/stencil_shadows2.bmx;45;0]
Build Error: failed to compile (-1) C:/BasicNG/Spiegel/stencil_shadows2.bmx
Process complete
The same problem in
openb3d.docs/extended/stencil_shadows_demo.bmx
additional here I cannot see a "zombie", but a strange looking object
The Double<-->Float problem exists in all examples where you call the RND() function. BlitzMax-NG returns a DOUBLE, but OpenB3D expects a FLOAT
Hey Mark, recently found this sepia shader to add more effects.. just the frag, use default.vert.glsl
same as greyscale..
// https://www.shadertoy.com/view/3slfDl
varying vec4 vertColor;
uniform sampler2D texture0;
void main() {
vec4 col = texture2D(texture0, gl_TexCoord[0].st)*vertColor;
float rr = .393;
float rg = .769;
float rb = .189;
float ra = 0.0;
float gr = .349;
float gg = .686;
float gb = .168;
float ga = 0.0;
float br = .272;
float bg = .534;
float bb = .131;
float ba = 0.0;
float red = (rr * col.r) + (rb * col.b) + (rg * col.g) + (ra * col.a);
float green = (gr * col.r) + (gb * col.b) + (gg * col.g) + (ga * col.a);
float blue = (br * col.r) + (bb * col.b) + (bg * col.g) + (ba * col.a);
gl_FragColor = vec4(red,green,blue,col.a);
}
Hi,
for anyone interested in shader-based textured shadows, Angros just shared FB example usage of his CreateShadowMap function in Openb3d Plus, so I ported the shadowmap code to Blitzmax, see shadowmap.bmx.
But sadly the main issue is that it only works in 640x480 resolution, if I try 320x240 or 800x600 I get the same result, the shadow seems to be rendered over the whole receiver mesh.
And the same thing happens when I change the shadowmap texture size from 512x512 to 256 or 1024.
Here is the frag shader and here is the vert shader.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.