Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add some docs #1145

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Add some docs #1145

wants to merge 1 commit into from

Conversation

JulianKnodt
Copy link

Not sure if these docs entirely make sense, but hopefully they introduce some concepts to newer users from rust who want to use GPU.

@LegNeato
Copy link
Contributor

Thank you! I'm not sure who these are targeted at so perhaps we should lock that down? This contains rudimentary things like "what is a shader" but then later uses a bunch of context that only people who know about GPUs would know or care about.

I was thinking of revamping the docs closer to something like the rust book. For example:

  • Introduction

    • What is Rust-GPU?
    • How to Use This Guide
  • Getting Started

    • Setting Up Your Environment
    • Your First Rust-GPU Program
    • Compiling and Running Shaders
  • Understanding Shaders

    • What Are Shaders?
    • The Role of Shaders in Graphics and Computing
    • Types of Shaders
      • Vertex Shaders
      • Fragment Shaders
      • Compute Shaders
  • Deep Dive: Shader Programming

    • Shader Languages: GLSL vs. SPIR-V
    • Writing Your First Shader
    • Debugging Shaders
    • Optimization Techniques
  • Working with Data in Shaders

    • Understanding Buffers and Textures
    • Managing Memory and Resources
    • Data Flow Between CPU and GPU
  • Advanced Topics

    • Synchronization and Concurrency in Shaders
    • Using External Libraries and Tools
    • Cross-Platform Considerations
  • Case Studies

    • Image Processing with Compute Shaders
    • Real-Time Rendering Techniques
    • Performance Benchmarks and Comparisons
  • Best Practices

    • Code Organization
    • Performance Tips
    • Security Considerations
  • Contributing to Rust-GPU

    • How to Contribute
    • Community Guidelines
    • Future Directions

And then in the "How to use this guide" section say something like:

How to Use This Guide

This guide is structured to help both beginners and experienced programmers. Whether you are completely new to GPU programming or an experienced developer looking to integrate Rust into your GPU projects, the content is organized to scale with your understanding.

  • If you’re new to GPU programming, start at the beginning of the guide. The early chapters are designed to introduce basic concepts and gradually build up to more complex topics.
  • If you have experience with GPU programming, you might want to skim the initial chapters and jump directly to the sections that cover Rust-specific tools and techniques.

Throughout this guide you’ll find explanations, code snippets, and practical examples. Each chapter builds on the previous one, so if you’re new to the subject, it's best to follow the chapters in order.

@FishArmy100
Copy link

Could also add some stuff for converting glsl/hlsl shaders to wgpu

@JulianKnodt
Copy link
Author

@LegNeato I think I wanted to add some docs for beginners, but I also wanted to explain the examples more thoroughly.
Your set of comprehensive docs looks quite good, but would take substantially more time. I can put some time into doing some sections, but I probably don't have enough context to do all of them.

@FishArmy100 If you want to open a separate issue, that would be great, but if you could explain specifically what you'd like (i.e syntax translation vs functionally different)

@LegNeato
Copy link
Contributor

@JulianKnodt Oh, I was not expecting you to write all the docs! I am just saying it is what I am hoping to write so if it makes sense to you, you could slot this in / tweak it so it matches what is (hopefully) to come.

Not sure if these docs entirely make sense, but hopefully they introduce some concepts to newer
users from rust who want to use GPU.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants