Skip to content
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 Apr 29, 2024
bb8d52c
Update textureWrap.mdx
ienground Apr 29, 2024
1da34fe
Update textureWrap.mdx
ienground Apr 29, 2024
0b9d42e
Update normalMaterial.mdx
ienground Apr 29, 2024
d986fc9
Update normalMaterial.mdx
ienground Apr 29, 2024
6d9ff0a
Update ambientMaterial.mdx
ienground Apr 29, 2024
4d18e70
Update ambientMaterial.mdx
ienground Apr 29, 2024
0276923
Update ambientMaterial.mdx
ienground Apr 29, 2024
8e0efa6
Update emissiveMaterial.mdx
ienground Apr 29, 2024
90716ff
Update emissiveMaterial.mdx
ienground Apr 29, 2024
66a09ad
Update emissiveMaterial.mdx
ienground Apr 29, 2024
c00b09b
Update specularMaterial.mdx
ienground Apr 29, 2024
c3fec78
Update specularMaterial.mdx
ienground Apr 29, 2024
0027dbc
Update shininess.mdx
ienground Apr 29, 2024
db8b01b
Update metalness.mdx
ienground Apr 29, 2024
151941a
Update shader.mdx
ienground Apr 29, 2024
cfb4a43
Update copyToContext.mdx
ienground Apr 29, 2024
1567c96
Update shader.mdx
ienground Apr 29, 2024
b20fc60
Update textureWrap.mdx
ienground Apr 29, 2024
9b6ad33
Update ambientMaterial.mdx
ienground Apr 29, 2024
2ad8fba
Update emissiveMaterial.mdx
ienground Apr 29, 2024
30b08c9
Update specularMaterial.mdx
ienground Apr 29, 2024
e632195
Update shininess.mdx
ienground Apr 29, 2024
3937790
Update metalness.mdx
ienground Apr 29, 2024
3583f28
Update shader.mdx
ienground Apr 29, 2024
f0c2692
Update copyToContext.mdx
ienground Apr 29, 2024
7253936
Update copyToContext.mdx
ienground Apr 29, 2024
3402ce0
Update setUniform.mdx
ienground Apr 29, 2024
bfe6fdb
Update camera.mdx
ienground Apr 29, 2024
403512d
Update camera.mdx
ienground Apr 29, 2024
73a80e2
Update camera.mdx
ienground Apr 29, 2024
25a1f54
Update camera.mdx
ienground Apr 29, 2024
26150cd
Update perspective.mdx
ienground Apr 29, 2024
3aa479e
Update linePerspective.mdx
ienground Apr 29, 2024
471f107
Update ortho.mdx
ienground Apr 29, 2024
a1fd3bb
Update ortho.mdx
ienground Apr 29, 2024
6ad85d1
Update perspective.mdx
ienground Apr 29, 2024
acbef38
Update frustum.mdx
ienground Apr 29, 2024
5009571
Update createCamera.mdx
ienground Apr 29, 2024
ca88256
Update createCamera.mdx
ienground Apr 29, 2024
251d007
Update setCamera.mdx
ienground Apr 29, 2024
93223ae
Update camera.mdx
ienground Apr 29, 2024
88444c4
Update eyeX.mdx
ienground Apr 29, 2024
bcce9e1
Update eyeY.mdx
ienground Apr 29, 2024
6d723c7
Update eyeZ.mdx
ienground Apr 29, 2024
3fe2461
Update centerX.mdx
ienground Apr 29, 2024
1b37518
Update centerY.mdx
ienground Apr 29, 2024
4380e88
Update centerX.mdx
ienground Apr 29, 2024
5281512
Update centerZ.mdx
ienground Apr 29, 2024
0570021
Update upX.mdx
ienground Apr 29, 2024
8c844b2
Update upY.mdx
ienground Apr 29, 2024
a38c86f
Update upZ.mdx
ienground Apr 29, 2024
3f8b129
Update perspective.mdx
ienground Apr 29, 2024
d4926f3
Update camera.mdx
ienground Apr 29, 2024
8a15140
Update eyeX.mdx
ienground Apr 29, 2024
a381639
Update eyeY.mdx
ienground Apr 29, 2024
c4c6cfa
Update eyeZ.mdx
ienground Apr 29, 2024
1ffa78c
Update copyToContext.mdx
ienground Apr 29, 2024
524e8a2
Update upX.mdx
ienground Apr 29, 2024
59c2c1d
Update upY.mdx
ienground Apr 29, 2024
61c2e4b
Update upZ.mdx
ienground Apr 29, 2024
4a7fe74
Update upX.mdx
ienground Apr 29, 2024
bcfb5a5
Update upY.mdx
ienground Apr 29, 2024
9a77ec0
Update perspective.mdx
ienground Apr 29, 2024
cd23936
Update perspective.mdx
ienground Apr 29, 2024
35d4fc0
Update setUniform.mdx
ienground Apr 29, 2024
996a2ce
Update ambientMaterial.mdx
ienground Apr 29, 2024
dd139ff
Update camera.mdx
ienground Apr 29, 2024
6c70ca1
Update linePerspective.mdx
ienground Apr 29, 2024
5d750c6
Update perspective.mdx
ienground Apr 29, 2024
f3ea6ec
Update perspective.mdx
ienground Apr 29, 2024
b63f13b
Update perspective.mdx
ienground Apr 29, 2024
9b38c1f
Update eyeZ.mdx
ienground May 1, 2024
dc1f292
Update setUniform.mdx
ienground May 1, 2024
54790e4
Update emissiveMaterial.mdx
ienground May 1, 2024
af7c704
Update shader.mdx
ienground May 1, 2024
b479e60
Update textureWrap.mdx
ienground May 1, 2024
9b898af
Update textureWrap.mdx
ienground May 1, 2024
9bb069c
Update shader.mdx
ienground May 1, 2024
faeec3d
Update centerX.mdx
ienground May 1, 2024
206df18
Update centerY.mdx
ienground May 1, 2024
3e18eb4
Update centerZ.mdx
ienground May 1, 2024
cef67e2
Update camera.mdx
ienground May 1, 2024
3bdaaff
Update eyeX.mdx
ienground May 1, 2024
4878427
Update eyeY.mdx
ienground May 1, 2024
e048107
Update eyeZ.mdx
ienground May 1, 2024
e5ee23a
Merge branch 'main' into ienground-patch-1
designerSejinOH May 1, 2024
ba45330
Update camera.mdx
ienground May 1, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update setUniform.mdx
  • Loading branch information
ienground authored Apr 29, 2024
commit 3402ce0d8cc2e7aa257b579058f34f9c8ac03bca
40 changes: 7 additions & 33 deletions src/content/reference/ko/p5.Shader/setUniform.mdx
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

댓글에 논의주신 것처럼, uniform이 셰이더 전용 변수명이라면 그냥 영문으로 두는게 맞는지 고민됩니다 😅 또는 유니폼(uniform)이라고 최초 영문 병기후, 이후 유니폼이라고 쓰는 것도 방법이 될 것 같습니다.

셰이더 잘알 세진님 @designerSejinOH 호출해봅니다 ㅎㅎ

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

uniform이 셰이더에서 '균일한 변수', '균일' 이렇게도 쓰여서 일단 균일로 해놨는데, 관련하여 전문가의 의견이 필요할 것 같기는 합니다 ㅎㅎ

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

uniform은 셰이더에서 특정 변수 타입을 의미하는 코드 용어로 사용되기 때문에 말씀해주신 것처럼 유니폼(uniform)으로 병기하는 편이 좋아 보입니다!

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>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이름을 가진 문자열 유니폼입니다.

~식으로도 가능할 것 같습니다!

<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
Expand Down Expand Up @@ -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>
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
---
Expand Down