-
Notifications
You must be signed in to change notification settings - Fork 188
[p5.js KO] 3D (textureWrap() ~ p5.Camera.perspective()) #312
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
88 commits
Select commit
Hold shift + click to select a range
0efe8b6
Update textureWrap.mdx
ienground bb8d52c
Update textureWrap.mdx
ienground 1da34fe
Update textureWrap.mdx
ienground 0b9d42e
Update normalMaterial.mdx
ienground d986fc9
Update normalMaterial.mdx
ienground 6d9ff0a
Update ambientMaterial.mdx
ienground 4d18e70
Update ambientMaterial.mdx
ienground 0276923
Update ambientMaterial.mdx
ienground 8e0efa6
Update emissiveMaterial.mdx
ienground 90716ff
Update emissiveMaterial.mdx
ienground 66a09ad
Update emissiveMaterial.mdx
ienground c00b09b
Update specularMaterial.mdx
ienground c3fec78
Update specularMaterial.mdx
ienground 0027dbc
Update shininess.mdx
ienground db8b01b
Update metalness.mdx
ienground 151941a
Update shader.mdx
ienground cfb4a43
Update copyToContext.mdx
ienground 1567c96
Update shader.mdx
ienground b20fc60
Update textureWrap.mdx
ienground 9b6ad33
Update ambientMaterial.mdx
ienground 2ad8fba
Update emissiveMaterial.mdx
ienground 30b08c9
Update specularMaterial.mdx
ienground e632195
Update shininess.mdx
ienground 3937790
Update metalness.mdx
ienground 3583f28
Update shader.mdx
ienground f0c2692
Update copyToContext.mdx
ienground 7253936
Update copyToContext.mdx
ienground 3402ce0
Update setUniform.mdx
ienground bfe6fdb
Update camera.mdx
ienground 403512d
Update camera.mdx
ienground 73a80e2
Update camera.mdx
ienground 25a1f54
Update camera.mdx
ienground 26150cd
Update perspective.mdx
ienground 3aa479e
Update linePerspective.mdx
ienground 471f107
Update ortho.mdx
ienground a1fd3bb
Update ortho.mdx
ienground 6ad85d1
Update perspective.mdx
ienground acbef38
Update frustum.mdx
ienground 5009571
Update createCamera.mdx
ienground ca88256
Update createCamera.mdx
ienground 251d007
Update setCamera.mdx
ienground 93223ae
Update camera.mdx
ienground 88444c4
Update eyeX.mdx
ienground bcce9e1
Update eyeY.mdx
ienground 6d723c7
Update eyeZ.mdx
ienground 3fe2461
Update centerX.mdx
ienground 1b37518
Update centerY.mdx
ienground 4380e88
Update centerX.mdx
ienground 5281512
Update centerZ.mdx
ienground 0570021
Update upX.mdx
ienground 8c844b2
Update upY.mdx
ienground a38c86f
Update upZ.mdx
ienground 3f8b129
Update perspective.mdx
ienground d4926f3
Update camera.mdx
ienground 8a15140
Update eyeX.mdx
ienground a381639
Update eyeY.mdx
ienground c4c6cfa
Update eyeZ.mdx
ienground 1ffa78c
Update copyToContext.mdx
ienground 524e8a2
Update upX.mdx
ienground 59c2c1d
Update upY.mdx
ienground 61c2e4b
Update upZ.mdx
ienground 4a7fe74
Update upX.mdx
ienground bcfb5a5
Update upY.mdx
ienground 9a77ec0
Update perspective.mdx
ienground cd23936
Update perspective.mdx
ienground 35d4fc0
Update setUniform.mdx
ienground 996a2ce
Update ambientMaterial.mdx
ienground dd139ff
Update camera.mdx
ienground 6c70ca1
Update linePerspective.mdx
ienground 5d750c6
Update perspective.mdx
ienground f3ea6ec
Update perspective.mdx
ienground b63f13b
Update perspective.mdx
ienground 9b38c1f
Update eyeZ.mdx
ienground dc1f292
Update setUniform.mdx
ienground 54790e4
Update emissiveMaterial.mdx
ienground af7c704
Update shader.mdx
ienground b479e60
Update textureWrap.mdx
ienground 9b898af
Update textureWrap.mdx
ienground 9bb069c
Update shader.mdx
ienground faeec3d
Update centerX.mdx
ienground 206df18
Update centerY.mdx
ienground 3e18eb4
Update centerZ.mdx
ienground cef67e2
Update camera.mdx
ienground 3bdaaff
Update eyeX.mdx
ienground 4878427
Update eyeY.mdx
ienground e048107
Update eyeZ.mdx
ienground e5ee23a
Merge branch 'main' into ienground-patch-1
designerSejinOH ba45330
Update camera.mdx
ienground File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Update setUniform.mdx
- Loading branch information
commit 3402ce0d8cc2e7aa257b579058f34f9c8ac03bca
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,38 +1,13 @@ | ||
| --- | ||
| title: setUniform | ||
| module: 3D | ||
| submodule: Material | ||
| submodule: 재질 | ||
| file: src/webgl/p5.Shader.js | ||
| description: > | ||
| <p>Sets the shader’s uniform (global) variables.</p> | ||
|
|
||
| <p>Shader programs run on the computer’s graphics processing unit (GPU). | ||
|
|
||
| They live in part of the computer’s memory that’s completely separate | ||
|
|
||
| from the sketch that runs them. Uniforms are global variables within a | ||
|
|
||
| shader program. They provide a way to pass values from a sketch running | ||
|
|
||
| on the CPU to a shader program running on the GPU.</p> | ||
|
|
||
| <p>The first parameter, <code>uniformName</code>, is a string with the | ||
| uniform’s name. | ||
|
|
||
| For the shader above, <code>uniformName</code> would be <code>'r'</code>.</p> | ||
|
|
||
| <p>The second parameter, <code>data</code>, is the value that should be used | ||
| to set the | ||
|
|
||
| uniform. For example, calling <code>myShader.setUniform('r', 0.5)</code> would | ||
| set | ||
|
|
||
| the <code>r</code> uniform in the shader above to <code>0.5</code>. data | ||
| should match the | ||
|
|
||
| uniform’s type. Numbers, strings, booleans, arrays, and many types of | ||
|
|
||
| images can all be passed to a shader with <code>setUniform()</code>.</p> | ||
| <p>셰이더의 균일 (전역) 변수를 설정합니다.</p> | ||
| <p>셰이더 프로그램은 컴퓨터의 그래픽 처리 장치(GPU)에서 실행됩니다. 이들을 실행하는 스케치와는 완전히 분리된 컴퓨터 메모리의 일부에서 상주하고 있습니다. 균일(Uniform)은 셰이더 프로그램 내의 전역 변수입니다. 이들은 CPU에서 실행되는 스케치로부터 GPU에서 실행되는 셰이더 프로그램으로 값을 전달하는 방법을 제공합니다. </p> | ||
| <p>첫번째 매개 변수인 <code>uniformName</code>은 균일의 이름을 가진 문자열입니다. 위 셰이더의 경우 <code>uniformName</code>은 <code>'r'</code>이 됩니다.</p> | ||
|
||
| <p>두번째 매개 변수인 <code>data</code>는 균일을 설정하는 데 사용되어야 하는 값입니다. 예를 들어, <code>myShader.setUniform('r', 0.5)</code>를 호출하면 위 셰이더의 <code>r</code> 균일을 0.5로 설정됩니다. 데이터는 균일의 종류와 일치해야 합니다. Numbers, strings, booleans, arrays, 그리고 여러 종류의 이미지가 <code>setUniform()</code>으로 셰이더에 전달될 수 있습니다.</p> | ||
| line: 622 | ||
| isConstructor: false | ||
| itemtype: method | ||
|
|
@@ -251,12 +226,11 @@ class: p5.Shader | |
| params: | ||
| - name: uniformName | ||
| description: | | ||
| <p>name of the uniform. Must match the name | ||
| used in the vertex and fragment shaders.</p> | ||
| <p>균일의 이름. 정점과 프래그먼트 셰이더에 사용되는 이름과 일치해야 합니다.</p> | ||
ienground marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| type: String | ||
| - name: data | ||
| description: | | ||
| <p>value to assign to the uniform. Must match the uniform’s data type.</p> | ||
| <p>균일에 할당할 값. 균일의 데이터 유형과 일치해야 합니다.</p> | ||
| type: 'Boolean|Number|Number[]|p5.Image|p5.Graphics|p5.MediaElement|p5.Texture' | ||
| chainable: true | ||
| --- | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
댓글에 논의주신 것처럼, uniform이 셰이더 전용 변수명이라면 그냥 영문으로 두는게 맞는지 고민됩니다 😅 또는 유니폼(uniform)이라고 최초 영문 병기후, 이후 유니폼이라고 쓰는 것도 방법이 될 것 같습니다.
셰이더 잘알 세진님 @designerSejinOH 호출해봅니다 ㅎㅎ
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
uniform이 셰이더에서 '균일한 변수', '균일' 이렇게도 쓰여서 일단 균일로 해놨는데, 관련하여 전문가의 의견이 필요할 것 같기는 합니다 ㅎㅎ
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
uniform은 셰이더에서 특정 변수 타입을 의미하는 코드 용어로 사용되기 때문에 말씀해주신 것처럼 유니폼(uniform)으로 병기하는 편이 좋아 보입니다!