Coder Social home page Coder Social logo

indievisuallab / unitygraphicsprogramming Goto Github PK

View Code? Open in Web Editor NEW
420.0 30.0 79.0 181.81 MB

書籍「UnityGraphicsProgramming vol.1」のサンプルコードリポジトリ

Home Page: https://indievisuallab.github.io/

License: MIT License

C# 83.54% ShaderLab 6.02% HLSL 0.99% GLSL 3.52% JavaScript 5.94%
unity unity3d shader 3d cg 3dcg

unitygraphicsprogramming's People

Contributors

a3geek avatar fuqunaga avatar hiroakioishi avatar kaiware007 avatar kodai100 avatar komietty avatar mattatz avatar nakajimakotaro avatar sakope avatar xjine avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

unitygraphicsprogramming's Issues

Compute shader error on Metal

I'm using 2018.3.6f1, MacBook Pro. I found out that some compute shaders are not correctly compiled on Metal because the lines of #pragma kernel contain comments. Unity shows error like "Macro names must be identifiers at kernel [KERNEL_NAME] metal :00".

ex) Boids.compute

// カーネル関数を指定
#pragma kernel ForceCS      // 操舵力を計算
#pragma kernel IntegrateCS  // 速度, 位置を計算

When I remove comments at the right, I can run samples without problems.

// カーネル関数を指定
#pragma kernel ForceCS
#pragma kernel IntegrateCS

Maybe it's Unity bug but I think it's safe to delete comments after #pragma kernel lines.

StableFluid error on Unity2019.

For the StableFluid - Solver2D.cs, you didn't assign texture for the Project-Step2 kernel and it causes an error on Unity 2019 version. It is fine on Unity2017 but can be an issue on Unity2019.

I would suggest you add below code at line 93 and 117.
computeShader.SetTexture(kernelMap[ComputeKernels.ProjectStep2], velocityId, velocityTex);

And also on the Solver2D.compute, on 'AdvectVelocity' kernel function,
at line 234, you used GetDimensions(w,h) using density texturebuffer which requires SetTexture(density),
in this context, using velocity texturebuffer is better way to solve the error.
(x)
density.GetDimensions(w, h);
(o)
velocity.GetDimensions(w, h);

Thank you for the awesome code!

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.