Giter Site home page Giter Site logo

Comments (4)

3Dickulus avatar 3Dickulus commented on July 28, 2024 1

You need to... #include "MathUtils.frag"
before #include "DE-Raytracer.frag" a.k.a. DE-Kn2cr11.frag

because the math functions reside in MathUtils.frag, check this file for special #defines for different random algorithms NV_RAND WANG_HASH etc.

if none are defined then you should at least get the default functions...

float rand(float v)
float rand(vec2 pos)
float rand(vec3 co)
vec2 rand2(vec2 co)

there are also some other functions and useful defines as well along with notes in comment lines.

if you have specialized math functions you want to use in other frags then this file is the place for them ;)

Also, remove the files DE-Kn2cr11.frag 3DKn-1.0.5.frag BufferShader-1.0.2.frag from your folders so that your frag uses the ones from the distribution Examples/Include/ folder

If you have modified these files you will need to remove the rand() functions, all of the raytracer frags in the Examples/Include/ are expecting the functions from MathUtils.frag to be present and available.

you may have to add "#version 140" as the first line of your fragment too.

when I remove those files and add "#version 140" as the first line of your fragment it compiles and runs on my setup..

Vendor: NVIDIA Corporation
Renderer: NVIDIA GeForce GTX 1650 SUPER/PCIe/SSE2
GL Driver: 4.5.0 NVIDIA 525.78.01
Display using GL 4.5 Core profile
Screenshot_20230116_192907

from fragm.

3Dickulus avatar 3Dickulus commented on July 28, 2024 1

...and if you have made improvements to any of the DE* 3D* or BufferShader* frags I would be happy to review a pull or merge request.

from fragm.

neozhaoliang avatar neozhaoliang commented on July 28, 2024

Thanks for this detailed help! I have successfully made FragM run on my windows machine, and I'm planning to refactor & improve my example. Thank again for your help!

from fragm.

neozhaoliang avatar neozhaoliang commented on July 28, 2024

@3Dickulus Hi, I recently refactored my code, and there were two main changes:

  1. I rewrote https://github.com/neozhaoliang/Hyperbolic-Honeycombs/blob/main/3D-ball-packings/Ball-Packings-UpperHalfSpace.frag. In the previous version, the computations in this file were too computationally intensive, which made it impossible for users with lower-performing CPUs to run the program. Now, this example should be able to run on most Nvidia graphics cards.

  2. I added a 2D example: https://github.com/neozhaoliang/Hyperbolic-Honeycombs/blob/main/2D-circle-packings/circle-packings.frag. You can see the sample results here: https://github.com/neozhaoliang/Hyperbolic-Honeycombs#2d-circle-packings-rank--4-level--2.

Please let me know if these examples cannot be run in FragM. Thank you.

from fragm.

Related Issues (20)

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.