Coder Social home page Coder Social logo

psx's People

Contributors

peterlemon 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

psx's Issues

How to render 3D triangles, prisms, and more complex 3D objects?

Hello,
your repo is really useful, and I'm finding it the best way for learning about pure assembly development on the PSX. I was able to modify the code part of some examples to do a bit of practice, but I'm currently struggling to understand something that's probably very trivial: how would I render triangles in 3D space (not in 2D), instead of the quads that are used in the Cube example; first to display very simple objects like a prism, and then possibly much more complex models, using the included ASM functions?

Looking in the .asm and .inc files, I found a function apparently analogous to ShadeTexQuadCullBackZSort but for triangles, ShadeTexTriCullBackZSort. If I understood correctly by reading the code, it should work with a data structure similar to the cube one, but without the attributes related to point 4 (since we're dealing with triangles and not rectangles)... however, no matter what I've tried, I can never display even a single triangular face correctly, and always have either glitches or nothing at all on screen. I don't really have code to post, because what I did is swap the macro call in the cube demo for the other one, modify the cube data structure to omit every segment that relates to the 4th point, leaving only the first 3, and then attempting (many, many times) to write multiple 3-point coordinates that I would think make sense for a triangle face.

On the Internet, many materials can be found about rendering complex 3D objects on the PSX, but they all relate to C development with various SDKs and not pure ASM development.
If possible, it would be nice to get some example code for drawing a simple triangle-based 3D object, like a pyramid or a prism as I said. Having that hard part as a base, it will be really easy to convert and draw any complex 3D object. I would really appreciate it.
Thank you for your time.

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.