GithubHelp home page GithubHelp logo

openb3d.docs's People

Contributors

markcwm avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

openb3d.docs's Issues

Koriolis.Zipstream imported but not always used

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)

Example not working

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

Sepia Shader

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);	
}

Shadowmap shader only works in 640x480

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.