This commit is contained in:
zzz
2025-06-11 18:37:23 +08:00
parent b844ebb3e5
commit b8b4cf5cf8
299 changed files with 564 additions and 112 deletions

View File

@@ -0,0 +1,52 @@
https://www.cnblogs.com/timlly/p/11471507.html
参考网站
# SM 流处理器
包括
运算核心
load/store 加载与储存
特殊数学运算 sin、cos、log
寄存器
L1缓存
全局内存缓存
纹理读取单元
纹理缓存
PolyMorph Engine:多边形引擎(负责属性装配、顶点拉取、曲面细分、栅格化 ~= 专门处理顶点相关)
2个Wrap Schedulers:负责wrap调度 1一个warp由32个线程组成warp调度器的指令通过Dispatch Units送到Core执行。
指令缓存
内部链接网络(?)
# GPU渲染管线
通过图形api调用drawcall->
指令推送到驱动,驱动检查是否合法->
驱动把指令缓存到buffer里->
下次flush会把指令推送到GPU->
----------主机-------
GPU通过主机接口Host Interface接受命令->
通过前端(Front End)处理这些命令(?)-> Front End是哪儿
图元分配开始工作(indexbuffer产生三角形形成批次, 分配给GPCs{ ? })->
SM的多边形引擎(Poly Morph Engine)通过三角形索引获取三角形数据(Vertex Fetch)->
SM的Wrap调度(SIMT)->
![[Pasted image 20230413163234.png]]
等到wrap完成了vertex-shader的所有指令三角形会被裁剪然后准备栅格化,GPU会把L1和L2缓存来进行vertex-shader和pixel-shader之间的数据通信
SM上的Attribute Setup保证了从vertex-shader来的数据经过插值后是pixel-shade是可读的。
光栅化引擎开始接受三角形工作(裁剪、背面剔除、Early-Z剔除)
32个线程分成8个2*2的像素块、如果没有三角形覆盖线程会被遮掩
最后会颜色和深度输出到ROP(渲染输出单元)进行深度测试和framebuffer混合
# 深度测试
### 深度测试失效情况:
开启透明测试
开启像素摒弃指令 - OpenGL的clip
关闭深度测试
开启Multi-Sampling多采样
### 深度测试会导致深度数据冲突
# CPU与GPU异构系统
分离
耦合

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

View File

@@ -0,0 +1 @@
[Unity 技术美术Trick —— dither妙用 - 知乎 (zhihu.com)](https://zhuanlan.zhihu.com/p/697133450)

View File

@@ -0,0 +1 @@
[Unity可交互雪地渲染Part5-雪地闪光及SSS - 知乎](https://zhuanlan.zhihu.com/p/30651821847)

View File

View File

@@ -0,0 +1,142 @@
# The quicktype FAQ
- [What is this?](#what-is-this)
- [How does this work?](#how-does-this-work)
- [How do I use this with my code?](#how-do-i-use-this-with-my-code)
- [No code appears when I paste my JSON](#why-does-quicktype-complain-about-my-json)
- [I think I found a bug!](#i-think-i-found-a-bug)
- [When will you support my favorite language?](#when-will-you-support-my-favorite-language)
- [Why do my types have weird names?](#why-do-my-types-have-weird-names)
- [I'd like the output to be a little different.](#id-like-the-output-to-be-a-little-different)
- [Am I allowed to use the generated code in my software?](#am-i-allowed-to-use-the-generated-code-in-my-software)
- [This map/dictionary should be a class!](#this-mapdictionary-should-be-a-class)
- [This class should be a map/dictionary!](#this-class-should-be-a-mapdictionary)
- [Where can I learn more about JSON Schema?](#where-can-i-learn-more-about-json-schema)
- [I'd like to customize the output for my particular application.](#id-like-to-customize-the-output-for-my-particular-application)
- [How can I control the property order in JSON Schema?](#how-can-i-control-the-property-order-in-json-schema)
- [quicktype is awesome, I'd like to support it!](#quicktype-is-awesome-id-like-to-support-it)
- [How is this different from other JSON converters?](#how-is-quicktype-different-from-other-json-converters)
## What is this?
[quicktype](https://app.quicktype.io) produces nice types and JSON (de)serializers for many programming languages. It can infer types from JSON but also takes types from JSON Schema, TypeScript, and GraphQL.
## How does this work?
You paste JSON on the left, and code appears on the right. [This video](https://www.youtube.com/watch?v=19bMU7jZ27w) gives a quick demonstration.
## How is this different from other JSON converters?
`quicktype` is superior to other JSON converters in many important ways:
- **Type inference**: quicktype infers optionals, dates, UUIDs, enums, integers, and unions. It also infers maps (versus objects) using a Markov chain.
- **Careful naming**: quicktypes naming system creates nice, legal, unique names for types and properties, handling reserved words and tricky corner cases (e.g. `{ “”: “this is legal”, “null”: “so is this”, "1;DROP TABLE users”: “and this" }`).
- **Heterogeneous data**: JSON data is often heterogenous. quicktype infers this, and creates union types in languages that support them, or synthetic union types in languages that dont (e.g. try quicktyping `[0, “zero”]` as Swift and Go).
- **Type unification**. This works across multiple samples, so you can quicktype a directory of API data, for example, and unify types across all responses (e.g. youll get just one `Customer` type, even if customer data occurs in many samples). You can also provide multiple samples for the same type for better coverage.
- **Marshalling code**: In addition to types, quicktype generates functions for marshalling your types to and from JSON.
- Supports dynamic languages: quicktype can add dynamic typechecks for JavaScript, TypeScript, Flow, Python, and Ruby.
- **Convenient CLI**: Run `quicktype https://blockchain.info/latestblock -o LatestBlock.ts` to quicktype a Bitcoin API in TypeScript.
- **Client-side**: [The web version of quicktype](https://app.quicktype.io/) runs on the client, so servers never see your data (most JSON converters send your JSON to their server)
- **Typed input**: Feed quicktype TypeScript or JSON Schema instead of JSON for better control over generated types.
- **Code quality**: quicktype emits clean code
## How do I use this with my code?
The generated code has comments at the start with a short code sample that shows how to convert a JSON string to instances of the generated types. You can also go the other way, which is very easy, too, but you'll have to look at the generated code to see how it works.
## No code appears when I paste my JSON
This is probably because your JSON is invalid. The most common issues we're seeing are
- Trailing commas in arrays and objects: `[1, 2, 3]` is valid JSON, while `[1, 2, 3,]` is not.
- Unquoted property keys in objects: `{ "name": "Mark" }` is valid JSON, while `{ name: "Mark" }` is not.
- Comments: JSON does not support comments.
If you're unsure whether your JSON is valid, please use [JSONLint](https://jsonlint.com).
## I think I found a bug!
Please [file an issue on GitHub](https://github.com/quicktype/quicktype/issues). Give as much context as you can so that we can reproduce it. Assume we know nothing about what you're trying to do (because we don't).
## When will you support my favorite language?
Please check whether there is [a pull request](https://github.com/quicktype/quicktype/pulls) that adds support for your language. If there is, please consider helping it along. If there isn't, please consider contributing one.
## Why do my types have weird names?
Sometimes quicktype has trouble giving names to your types. There are a couple of causes for this:
- The name quicktype would like to give to your type conflicts with a name that's already used in the target language, such as `String` in C#.
- Two or more types in your data have the same name.
- A type has so many potential names that quicktype can't find a commonality between them.
If you're using JSON Schema, you can use the `title` property to give a type a name that quicktype tries hard to use.
## I'd like the output to be a little different.
Check out the "Language" and "Other" tabs in the options panel. What you're looking for might just be there:
<img width="33%" height="33%" alt="Screenshot showing the options panel" src="https://raw.githubusercontent.com/quicktype/quicktype/master/media/faq/options-panel.png" />
If it isn't, then depending on your coding skills, you might be able to [customize the output](https://blog.quicktype.io/customizing-quicktype/).
## Am I allowed to use the generated code in my software?
Yes, there are no intellectual property restrictions on the code that quicktype generates.
## This map/dictionary should be a class!
quicktype has [advanced heuristics](https://blog.quicktype.io/markov/) to decide whether a JSON object should be represented by a class or a map, but sometimes it gets it wrong. If it generates a map, but you'd rather have a class, you can disable map detection in the options panel:
<img width="66%" height="66%" alt="Screenshot showing the 'Detect maps' switch in the options panel" src="https://raw.githubusercontent.com/quicktype/quicktype/master/media/faq/disable-detect-maps.png" />
## This class should be a map/dictionary!
quicktype has [advanced heuristics](https://blog.quicktype.io/markov/) to decide whether a JSON object should be represented by a class or a map, but sometimes it gets it wrong. If it generates a class, but you need a map, first make sure that you have the "Detect maps" option set in the options panel. Also, check that all properties in the object have the same exact type because quicktype only makes a map if that's the case. If that still doesn't do it, you have two options:
- Duplicate some of the properties and/or change the property names to look more random.
- Output JSON Schema, modify it to produce a map, and then use the schema as the input to quicktype.
## Where can I learn more about JSON Schema?
The [JSON Schema homepage](http://json-schema.org) contains many links and resources.
## I'd like to customize the output for my particular application.
We have [a blog post](https://blog.quicktype.io/customizing-quicktype/) on that very topic.
## How can I control the property order in JSON Schema?
There is a custom schema field `quicktypePropertyOrder` which can be used to specify the order of properties for quicktype.
For example:
```json
...
"Location": {
"quicktypePropertyOrder": [ "latitude", "longitude" ],
"type": "object",
"properties": {
"latitude": {
"type": "number",
"description": "The latitude component of the location",
"example": -32.204754
},
...
},
"required": [ "latitude", "longitude" ]
},
...
```
## quicktype is awesome, I'd like to support it!
There are many ways you can support quicktype:
- Tell all your friends about it! Show it around, tweet about it, write a blog post, present it at a lightning talk.
- quicktype is open source - please contribute! We need documentation at least as much as code, so you don't need strong coding skills to make an impact. If you do, we have [lots of open issues](https://github.com/quicktype/quicktype/issues) that need resolving, almost all of our target languages can be improved, and there are many, many programming languages that quicktype doesn't support yet. Talk to us [on Slack](http://slack.quicktype.io) if you're interested - we're always happy to help.

Binary file not shown.

After

Width:  |  Height:  |  Size: 344 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

View File

View File

@@ -0,0 +1,12 @@
https://github.com/ssloy/tinyrenderer/wiki/Lesson-0:-getting-started 大佬github
https://zhuanlan.zhihu.com/p/434874992 从零
https://www.drflower.top/posts/e7715f6d/#TinyRenderer
https://zhuanlan.zhihu.com/p/399056546 笔记
https://zhuanlan.zhihu.com/p/59302124 C#手写
https://learnopengl-cn.github.io/ openGL中文翻译

View File

@@ -0,0 +1,12 @@
写笔记复习过程
[[透视矫正]]
[[冯 高光]]
[[视锥剔除]]
[[视口剔除]]
Sutherland-Hodgeman凸多边形裁剪算法
Weiler-Atherton算法为凹多边形无残留
https://blog.csdn.net/m0_56494923/article/details/128514324

View File

@@ -0,0 +1,5 @@
出现原因 :取质心坐标的时候 取得是已经经过了透视变换得点
![[Pasted image 20230613102109.png]]
解决方法: todo